diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-29 20:41:38 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-29 20:41:38 -0800 |
commit | 71af3819c0b79ce09e2f8237aca22ce902510bdd (patch) | |
tree | e091f6f744d78e61b6b9d859f02a3a0b62b70bc9 | |
parent | 0e278d23faa3a07bc2fc7e473b29af6429d6aeef (diff) | |
download | zbatery-71af3819c0b79ce09e2f8237aca22ce902510bdd.tar.gz |
do not expand paths given by shell
Shells already expand '~' before the executables see it, and relative paths inside symlinks can get set incorrectly to the actual directory name, and not the (usually desired) symlink name for things like Capistrano. Since our paths are now unexpanded, we must now check the "working_directory" directive and raise an error if the user specifies the config file in a way that makes the config file unreloadable.
-rwxr-xr-x | bin/zbatery | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/zbatery b/bin/zbatery index 621ae40..619edcf 100755 --- a/bin/zbatery +++ b/bin/zbatery @@ -69,7 +69,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| opts.on("-P", "--pid FILE", "DEPRECATED") do |f| warn %q{Use of --pid/-P is strongly discouraged} warn %q{Use the 'pid' directive in the Zbatery config file instead} - options[:pid] = File.expand_path(f) + options[:pid] = f end opts.on("-s", "--server SERVER", @@ -86,7 +86,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| end opts.on("-c", "--config-file FILE", "Unicorn-specific config file") do |f| - options[:config_file] = File.expand_path(f) + options[:config_file] = f end # I'm avoiding Unicorn-specific config options on the command-line. |