emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/haskell-mode 0faf9f1324 03/24: Use shell-quote-argument on


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-mode 0faf9f1324 03/24: Use shell-quote-argument on file path in compilation command
Date: Tue, 1 Nov 2022 22:58:51 -0400 (EDT)

branch: elpa/haskell-mode
commit 0faf9f13246d40deb9bda8e7a71cfc420e69de74
Author: User1 <53079444+EuanParr@users.noreply.github.com>
Commit: User1 <53079444+EuanParr@users.noreply.github.com>

    Use shell-quote-argument on file path in compilation command
    
    Pass the file path through shell-quote-argument instead
    of surrounding it with quotes, which should be safer.
---
 haskell-compile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/haskell-compile.el b/haskell-compile.el
index 8b19662f4b..b19dfd0212 100644
--- a/haskell-compile.el
+++ b/haskell-compile.el
@@ -69,7 +69,7 @@ For legacy compat, `%s' is replaced by the stack package top 
folder."
   :type 'string)
 
 (defcustom haskell-compile-command
-  "ghc -Wall -ferror-spans -fforce-recomp -c \"%s\""
+  "ghc -Wall -ferror-spans -fforce-recomp -c %s"
   "Default build command to use for `haskell-cabal-build' when no cabal or 
stack file is detected.
 The `%s' placeholder is replaced by the current buffer's filename."
   :group 'haskell-compile
@@ -229,7 +229,7 @@ base directory for build tools, or the current buffer for
                     ((null edit) default)
                     ((eq edit '-) alt)
                     (t (compilation-read-command default))))
-         (command (format template local-dir-or-file))
+         (command (format template (shell-quote-argument local-dir-or-file)))
          (dir (if (directory-name-p local-dir-or-file)
                   local-dir-or-file
                 default-directory))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]