Skip to content

Commit 7cffe97

Browse files
committed
Quote paths passed to hasktags command
1 parent 67ccbe2 commit 7cffe97

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: haskell-cabal.el

+6-3
Original file line numberDiff line numberDiff line change
@@ -1138,9 +1138,12 @@ recursively avoiding visiting unnecessary heavy directories like
11381138
.git, .svn, _darcs and build directories created by
11391139
cabal-install, stack, etc and passes list of found files to Hasktags."
11401140
(if (eq system-type 'windows-nt)
1141-
(format "%s --output=\"%s\\TAGS\" -x -e \"%s\"" haskell-hasktags-path dir dir)
1141+
(format "%s --output=%s -x -e %s"
1142+
haskell-hasktags-path
1143+
(shell-quote-argument (expand-file-name "TAGS" dir))
1144+
(shell-quote-argument dir))
11421145
(format "cd %s && %s | %s"
1143-
dir
1146+
(shell-quote-argument dir)
11441147
(concat "find . "
11451148
"-type d \\( "
11461149
"-path ./.git "
@@ -1158,7 +1161,7 @@ cabal-install, stack, etc and passes list of found files to Hasktags."
11581161
"-name '#*' "
11591162
"-or -name '.*' "
11601163
"\\) -print0")
1161-
(format "xargs -0 %s -e -x" haskell-hasktags-path))))
1164+
(format "xargs -0 %s -e -x" (shell-quote-argument haskell-hasktags-path)))))
11621165

11631166
(provide 'haskell-cabal)
11641167
;;; haskell-cabal.el ends here

0 commit comments

Comments
 (0)