-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Git] Remove calls to Dir.chdir #62
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
end | ||
options = {} | ||
options[:git] = url | ||
options[:commit] = `git -C #{target_path} rev-parse HEAD`.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add quotes around #{target_path}
@benasher44 👍 updated and added a 📝 entry. |
@@ -15,7 +15,7 @@ def options_specific? | |||
def checkout_options | |||
options = {} | |||
options[:git] = url | |||
options[:commit] = `git -C #{target_path} rev-parse HEAD`.chomp | |||
options[:commit] = `git -C "#{target_path}" rev-parse HEAD`.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use git!("-C", target_path, "rev-parse", "HEAD")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed someone had used 's for a reason and didn't want to change that in this PR, can switch it to
target_git` tho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sg2m
@segiddins @benasher44 Updated |
closes CocoaPods/CocoaPods#5880