Skip to content

Commit

Permalink
CLI: Fix restart command from subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Apr 8, 2024
1 parent 02f5ad1 commit 5b14fdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7
6 changes: 5 additions & 1 deletion src/nextjournal/garden_cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,11 @@
(call-api (assoc opts :command "logs" :as :stream)))

(defn restart [{:keys [opts]}]
(call-api (assoc opts :command "restart" :as :stream)))
(let [working-dir (path-from-git-root-parent)]
(call-api (-> opts
(assoc :command "restart" :as :stream)
(cond-> working-dir
(assoc :working-dir working-dir))))))

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

0 comments on commit 5b14fdf

Please sign in to comment.