Skip to content

Commit

Permalink
Check if the spack remote is added and add it if not
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardkaindl committed Oct 27, 2024
1 parent b930a6f commit fab1b1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cli/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -1224,8 +1224,11 @@ def prepare_github_cli(args: argparse.Namespace) -> int:
print("Setting the default remote repository to spack/spack")
spawn("gh", ["repo", "set-default", "spack/spack"])

# TODO: Check if the spack remote is added and add it if not:
# git remote add upstream [email protected]:spack/spack.git
# Check if the spack remote is added and add it if not:
remotes = getoutput("git remote -v")
if "spack/spack" not in remotes:
print("The spack remote is not added, adding it.")
spawn("git", ["remote", "add", "spack", "[email protected]:spack/spack.git"])
return Success


Expand Down

0 comments on commit fab1b1a

Please sign in to comment.