From 87e760784176b967da2ca8d0db3f54fe6a97598f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 Nov 2009 20:19:40 -0800 Subject: bin/rainbows: 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. --- bin/rainbows | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/rainbows b/bin/rainbows index c5c3d87..ddf968c 100644 --- a/bin/rainbows +++ b/bin/rainbows @@ -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 Unicorn 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. -- cgit v1.2.3-24-ge0c7