From bbd32de444ef64c1f1a1c98561183efb8c84466f Mon Sep 17 00:00:00 2001 From: James Foucar Date: Thu, 8 Feb 2024 15:40:13 -0700 Subject: [PATCH] Provenance: do not crash if config_src does not exist Just skip that file. This should help with containerized E3SM. [BFB] --- cime_config/customize/provenance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cime_config/customize/provenance.py b/cime_config/customize/provenance.py index 5da588d39b8d..a192307e0475 100644 --- a/cime_config/customize/provenance.py +++ b/cime_config/customize/provenance.py @@ -78,8 +78,9 @@ def _record_git_provenance(srcroot, exeroot, lid): # Git config config_src = os.path.join(gitroot, "config") - config_prov = os.path.join(exeroot, "GIT_CONFIG.{}".format(lid)) - utils.safe_copy(config_src, config_prov, preserve_meta=False) + if os.path.exists(config_src): + config_prov = os.path.join(exeroot, "GIT_CONFIG.{}".format(lid)) + utils.safe_copy(config_src, config_prov, preserve_meta=False) def _find_git_root(srcroot):