mirror of
https://github.com/daveberrys/guh.git
synced 2026-11-29 00:46:45 +08:00
fix bug not linking remotes
This commit is contained in:
1 parent
e512398aba
commit
664d8a8da6
2 files changed
+3
-8
No files matched your search
@@ -1,13 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
echo "This will install the compiled local 'guh' binary to '~/.local/bin' directory."
|
echo "This will install the compiled local 'guh' binary to '~/.local/bin' directory."
|
||||||
read -p "Do you want to continue? [y/n]: " choice
|
|
||||||
|
|
||||||
if [ "$choice" != "Y" ] && [ "$choice" != "y" ]; then
|
|
||||||
echo "Installation cancelled."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Installing..."
|
echo "Installing..."
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,9 @@ var linkRepoCmd = &cobra.Command{
|
|||||||
utils.RunGit(false, "remote", "get-url", "origin")
|
utils.RunGit(false, "remote", "get-url", "origin")
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
utils.RunGitSequence(false, []string{"remote", "set-url", "origin", args[0]})
|
utils.RunGit(true, "remote", "remove", "origin")
|
||||||
|
utils.RunGit(false, "remote", "add", "origin", args[0])
|
||||||
|
|
||||||
fmt.Printf("Linked repository to: %s\n", args[0])
|
fmt.Printf("Linked repository to: %s\n", args[0])
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user