Skip to content

Commit

Permalink
Fix problems with spaces in paths (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett-Best committed May 10, 2021
1 parent 04e4fc3 commit 7312776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pod/command/patch/apply.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def apply_patch(patch_file)
directory_arg = (ios_project_path.to_s.eql? ".") ? "Pods" : File.join(ios_project_path, 'Pods')

Dir.chdir(repo_root) {
check_cmd = "git apply --check #{patch_file} --directory=#{directory_arg} -p2 2> /dev/null"
check_cmd = "git apply --check '#{patch_file}' --directory='#{directory_arg}' -p2 2> /dev/null"

can_apply = system(check_cmd)
if can_apply
Expand Down
2 changes: 1 addition & 1 deletion lib/pod/command/patch/create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def run
UI.puts "Creating patch"
theirs = Pathname.new(work_dir).join(@name).relative_path_from(config.project_root)
ours = config.project_pods_root.join(@name).relative_path_from(config.project_root)
gen_diff_cmd = "git diff --no-index #{theirs} #{ours} > #{patch_file}"
gen_diff_cmd = "git diff --no-index '#{theirs}' '#{ours}' > '#{patch_file}'"

did_succeed = system(gen_diff_cmd)
if not did_succeed.nil?
Expand Down

0 comments on commit 7312776

Please sign in to comment.