From 664d8a8da632dee99587f36d0786583ece98dd4c Mon Sep 17 00:00:00 2001 From: daveberrys <84567826+daveberrys@users.noreply.github.com> Date: Sun, 19 Jul 2026 03:06:58 +0800 Subject: [PATCH] fix bug not linking remotes --- install_guh.sh | 7 ------- src/cmd/create/repo.go | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/install_guh.sh b/install_guh.sh index 2315d22..bf2ea08 100644 --- a/install_guh.sh +++ b/install_guh.sh @@ -1,13 +1,6 @@ #!/bin/bash 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 diff --git a/src/cmd/create/repo.go b/src/cmd/create/repo.go index 23fbb2d..df76973 100644 --- a/src/cmd/create/repo.go +++ b/src/cmd/create/repo.go @@ -19,7 +19,9 @@ var linkRepoCmd = &cobra.Command{ utils.RunGit(false, "remote", "get-url", "origin") return nil 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]) return nil }