Support spaces in git repository path
See https://github.com/basecamp/kamal/issues/1036
This commit is contained in:
committed by
David Stosik
parent
e34031f70c
commit
0840fdf0dd
@@ -6,12 +6,12 @@ module Kamal::Commands::Builder::Clone
|
||||
end
|
||||
|
||||
def clone
|
||||
git :clone, Kamal::Git.root, "--recurse-submodules", path: clone_directory
|
||||
git :clone, escaped_root, "--recurse-submodules", path: clone_directory
|
||||
end
|
||||
|
||||
def clone_reset_steps
|
||||
[
|
||||
git(:remote, "set-url", :origin, Kamal::Git.root, path: build_directory),
|
||||
git(:remote, "set-url", :origin, escaped_root, path: build_directory),
|
||||
git(:fetch, :origin, path: build_directory),
|
||||
git(:reset, "--hard", Kamal::Git.revision, path: build_directory),
|
||||
git(:clean, "-fdx", path: build_directory),
|
||||
@@ -26,4 +26,8 @@ module Kamal::Commands::Builder::Clone
|
||||
def clone_revision
|
||||
git :"rev-parse", :HEAD, path: build_directory
|
||||
end
|
||||
|
||||
def escaped_root
|
||||
Kamal::Git.root.shellescape
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user