Skip to content

Commit 5b14fdf

Browse files
committed
CLI: Fix restart command from subdirectories
1 parent 02f5ad1 commit 5b14fdf

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

resources/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.6
1+
0.1.7

src/nextjournal/garden_cli.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,11 @@
280280
(call-api (assoc opts :command "logs" :as :stream)))
281281

282282
(defn restart [{:keys [opts]}]
283-
(call-api (assoc opts :command "restart" :as :stream)))
283+
(let [working-dir (path-from-git-root-parent)]
284+
(call-api (-> opts
285+
(assoc :command "restart" :as :stream)
286+
(cond-> working-dir
287+
(assoc :working-dir working-dir))))))
284288

285289
(defn stop [m]
286290
(let [{:keys [ok message]} (call-api (merge {:command "stop"} (:opts m)))]

0 commit comments

Comments
 (0)