summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-07-06 11:42:28 +0800
committereltrac <hi@eltr.ac>2026-07-06 11:42:28 +0800
commit92d6a708f16b264c0ccc81e7634a2966ebce8c1b (patch)
tree59b5366e3c2820d4a2218a630358f4dd3b1a36ca
parent7d3f6f6b8b6d55a57e629dc69c0967416b3be74c (diff)
fix: unable to get current branch
-rw-r--r--vimulti.clj6
1 files changed, 4 insertions, 2 deletions
diff --git a/vimulti.clj b/vimulti.clj
index 6c59807..f7a3782 100644
--- a/vimulti.clj
+++ b/vimulti.clj
@@ -48,9 +48,11 @@
;; git helpers
(defn- get-current-branch [dir]
- (shell {:dir dir
+ (-> (shell {:dir dir
:out :string}
- "git branch --show-current"))
+ "git branch --show-current")
+ :out
+ str/trim-newline))
;; target should be a string like "app-name:branch" or "app-name@tag"
;; returns a map with keys :app-name :branch :tag...