branch: elpa/dockerfile-mode
commit 6fcecb517dcea1db2443dbc2b12ccc1382d67ec9
Merge: 40be396417 d1e9754285
Author: Drew Csillag <d...@thecsillags.com>
Commit: Drew Csillag <d...@thecsillags.com>

    Merge pull request #21 from jaccarmac/fix-space-regression
    
    Fix build failure when path of Dockerfile contains spaces.
---
 dockerfile-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dockerfile-mode.el b/dockerfile-mode.el
index 0e37485848..b992b81957 100644
--- a/dockerfile-mode.el
+++ b/dockerfile-mode.el
@@ -90,7 +90,7 @@
   (save-buffer)
   (if (stringp image-name)
       (async-shell-command
-       (format "%s docker build -t %s -f %s %s" (if dockerfile-use-sudo "sudo" 
"") image-name (buffer-file-name) (file-name-directory (buffer-file-name)))
+       (format "%s docker build -t %s -f \"%s\" \"%s\"" (if 
dockerfile-use-sudo "sudo" "") image-name (buffer-file-name) 
(file-name-directory (buffer-file-name)))
        "*docker-build-output*")
     (print "docker-image-name must be a string, consider surrounding it with 
double quotes")))
 
@@ -104,7 +104,7 @@
   (save-buffer)
   (if (stringp image-name)
       (async-shell-command
-       (format "%s docker build --no-cache -t %s -f %s %s" (if 
dockerfile-use-sudo "sudo" "") image-name (buffer-file-name) 
(file-name-directory (buffer-file-name)))
+       (format "%s docker build --no-cache -t %s -f \"%s\" \"%s\"" (if 
dockerfile-use-sudo "sudo" "") image-name (buffer-file-name) 
(file-name-directory (buffer-file-name)))
        "*docker-build-output*")
     (print "docker-image-name must be a string, consider surrounding it with 
double quotes")))
 

Reply via email to