[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dockerfile-mode d1e9754285 037/104: Fix build failure when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dockerfile-mode d1e9754285 037/104: Fix build failure when path of Dockerfile contains spaces. |
Date: |
Sat, 29 Jan 2022 07:58:29 -0500 (EST) |
branch: elpa/dockerfile-mode
commit d1e9754285313e962477af17dbc5c6aa04084441
Author: Jacob MacDonald <jaccarmac@gmail.com>
Commit: Jacob MacDonald <jaccarmac@gmail.com>
Fix build failure when path of Dockerfile contains spaces.
Since the substitutions into the format call were not escaped, the shell
was interpreting paths with spaces in them as two arguments. Surrounding
said paths in spaces forces the shell to treat the literal spaces in the
path as part of the path instaead of a separator. Escaping spaces (" "
-> "\ ") would probably be a nicer solution, but the code is less
simple.
---
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")))
- [nongnu] branch elpa/dockerfile-mode created (now 5db94549ce), ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 58179938b2 004/104: Only recognize Dockerfile keywords at beginning of the line, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 922845c229 002/104: Added dockerfile-mode.el, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 7f92c17b99 006/104: Option to use sudo when invoking docker builder, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 8771eb1d9a 022/104: Use async-shell-command instead of shell-command, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 6ed974d462 014/104: Autoload docker mode for Dockerfiles., ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode d1e9754285 037/104: Fix build failure when path of Dockerfile contains spaces.,
ELPA Syncer <=
- [nongnu] elpa/dockerfile-mode e20c7e587a 025/104: Correctly set require-final-newline, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 35d10860d9 039/104: Fix inability to build images on Windows., ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 98434943c3 005/104: Adjust auto-mode regexp in README., ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 1015f3818d 016/104: Added copy and onbuild commands, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode a532e30371 023/104: Use syntax highlighting in README, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 6a64806b78 029/104: now treats single quotes like double quotes, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 34a0a5d082 030/104: Merge branch 'master' of github.com:spotify/dockerfile-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode 26239c3b95 043/104: Resolve spotify/#24, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode fdebd1eda5 044/104: Pass --build-args to docker build, ELPA Syncer, 2022/01/29
- [nongnu] elpa/dockerfile-mode c462ba8650 007/104: Merge pull request #1 from thomasf/master, ELPA Syncer, 2022/01/29