Skip to content

Commit

Permalink
Merge branch 'jgfouca/fix_prov_git_config' into master (PR E3SM-Proje…
Browse files Browse the repository at this point in the history
…ct#6227)

Provenance: do not crash if config_src does not exist

Just skip that file. This should help with containerized E3SM.

Fixes E3SM-Project#6225

[BFB]
  • Loading branch information
jgfouca committed Feb 9, 2024
2 parents abe7218 + bbd32de commit 5886da6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cime_config/customize/provenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 5886da6

Please sign in to comment.