-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow to run the bin/logstash-plugin install <pack> outside of the logstash directory #6602
Allow to run the bin/logstash-plugin install <pack> outside of the logstash directory #6602
Conversation
Logstash directory Fixes: elastic#6599
|
||
# Some of the internal classes requires to be inside the LOGSTASH_HOME to find the relative | ||
# path of the core gems. | ||
Dir.chdir(LogStash::Environment::LOGSTASH_HOME) do |
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.
Does this undo the chdir
after it's done?
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.
Yes its a block, it will return to the original directory:
puts "current dir: #{Dir.pwd}"
Dir.chdir("/Users/ph") do
puts "current dir: #{Dir.pwd}"
end
puts "current dir: #{Dir.pwd}"
⚙ph@sashimi/tmp ruby testing.rb
current dir: /private/tmp
current dir: /Users/ph
current dir: /private/tmp
⚙ph@sashimi/tmp
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.
Can you clarify if chdir will be reverted to PWD, once the install is complete?
LGTM |
@ph this needs to go to 5.2 as well |
Pier-Hugues Pellerin merged this into the following branches!
|
Allow to run the bin/logstash-plugin install outside of the logstash directory
Fixes: #6599