diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-18 17:28:12 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-18 17:40:46 -0800 |
commit | 15217fe1162a400fa1cd2216e395d9f17be8083e (patch) | |
tree | 657468e709e5438a82f4e93dcafc98fa01abc033 /bin/unicorn | |
parent | 57348bff1af3bd5817f1e7b12cd297d61d2f9414 (diff) | |
download | unicorn-15217fe1162a400fa1cd2216e395d9f17be8083e.tar.gz |
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.
Diffstat (limited to 'bin/unicorn')
-rwxr-xr-x | bin/unicorn | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/unicorn b/bin/unicorn index 225e819..325afb3 100755 --- a/bin/unicorn +++ b/bin/unicorn @@ -68,7 +68,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 Unicorn config file instead} - options[:pid] = File.expand_path(f) + options[:pid] = f end opts.on("-s", "--server SERVER", @@ -85,7 +85,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. |