fix bug not linking remotes

This commit is contained in:
daveberrys committed 2026-07-19 03:06:58 +08:00
1 parent e512398aba
commit 664d8a8da6
2 files changed
+3 -8

No files matched your search

-7
View File
@@ -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
+3 -1
View File
@@ -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
} }