From d16335a6b675e7b0284f533a1b6b007348cd87ee Mon Sep 17 00:00:00 2001 From: Howard Yeh Date: Sat, 2 May 2015 21:35:46 +0800 Subject: [PATCH] Fix rails wrapper's arguments expansion problem. "$@" expands to multiple words, and breaks `[` if there are multiple arguments. Use "$*" == "console" instead, since this expands all the arguments to a single word, which is what we want instead. --- templates/web.template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/web.template.yml b/templates/web.template.yml index c40452e..d0b7519 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -149,7 +149,7 @@ run: contents: | #!/bin/bash # If they requested a console, load pry instead - if [ "$@" == "c" -o "$@" == "console" ] + if [ "$*" == "c" -o "$*" == "console" ] then (cd /var/www/discourse && RAILS_ENV=production sudo -H -E -u discourse bundle exec pry -r ./config/environment) else -- 2.25.1