Skip to content

Commit

Permalink
Merge pull request #131 from NOAA-GFDL/122.github.checkout
Browse files Browse the repository at this point in the history
switching checkout repo; fixing bug in branch checkout
  • Loading branch information
ilaflott authored Jul 30, 2024
2 parents ac287ad + 1c24a1e commit fb6b822
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fre/pp/checkoutScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ def _checkoutTemplate(experiment, platform, target, branch='main'):
click.echo("cloning experiment into directory " + directory + "/" + name)
clonecmd = (
f"git clone -b {branch} --single-branch --depth=1 --recursive "
f"https://gitlab.gfdl.noaa.gov/fre2/workflows/postprocessing.git {name}" )
f"https://github.com/NOAA-GFDL/fre-workflows.git {name}" )
preexist_error = f"fatal: destination path '{name}' exists and is not an empty directory."
click.echo(clonecmd)
cloneproc = subprocess.run(clonecmd, shell=True, check=False, stdout=PIPE, stderr=STDOUT)
if not cloneproc.returncode == 0:
if re.search(preexist_error.encode('ASCII'),cloneproc.stdout) is not None:
Expand Down Expand Up @@ -68,7 +69,7 @@ def checkoutTemplate(experiment, platform, target, branch="main"):
Wrapper script for calling checkoutTemplate - allows the decorated version
of the function to be separate from the undecorated version
'''
return _checkoutTemplate(experiment, platform, target, branch="main")
return _checkoutTemplate(experiment, platform, target, branch)


if __name__ == '__main__':
Expand Down

0 comments on commit fb6b822

Please sign in to comment.