Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 6c59b5e

Browse files
committed
Also quote the path to zig-zig-bin since it may contain spaces or \
1 parent 2d7b61f commit 6c59b5e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

zig-mode.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@
7171
(defun zig--run-cmd (cmd &optional source &rest args)
7272
"Use compile command to execute a zig CMD with ARGS if given.
7373
If given a SOURCE, execute the CMD on it."
74-
(let ((cmd-args
75-
(if source
76-
(mapconcat 'shell-quote-argument (cons source args) " ")
77-
args)))
78-
(compilation-start (concat zig-zig-bin " " cmd " " cmd-args))))
74+
(let ((cmd-args (if source (cons source args) args)))
75+
(compilation-start (mapconcat 'shell-quote-argument
76+
`(,zig-zig-bin ,cmd ,@cmd-args) " "))))
7977

8078
;;;###autoload
8179
(defun zig-compile ()

0 commit comments

Comments
 (0)