-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if the spack remote is added and add it if not
- Loading branch information
1 parent
b930a6f
commit fab1b1a
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
||
|