Просмотр исходного кода

fix: gh install trim remote origin (#2030)

Aiden Cline 1 год назад
Родитель
Сommit
847a63e15a
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      packages/opencode/src/cli/cmd/github.ts

+ 5 - 1
packages/opencode/src/cli/cmd/github.ts

@@ -185,7 +185,11 @@ export const GithubInstallCommand = cmd({
         }
 
         // Get repo info
-        const info = await $`git remote get-url origin`.quiet().nothrow().text()
+        const info = await $`git remote get-url origin`
+          .quiet()
+          .nothrow()
+          .text()
+          .then((text) => text.trim())
         // match https or git pattern
         // ie. https://github.com/sst/opencode.git
         // ie. https://github.com/sst/opencode