diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-06-04 22:41:59 +0100 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-06-04 22:41:59 +0100 |
commit | 767890465df14263df0f8965e1b536fdefa84868 (patch) | |
tree | 234bda9861b439a397e2c31de8d54a8d4ecdb112 /app/controllers/admin_general_controller.rb | |
parent | 5d48a55fffd1a75d6e8240bfea9982a43b103741 (diff) |
Silly syntax bug
Backslashes are interpreted twice inside backticks, once by Ruby
and a second time by the shell, so you need twice as many as you
think you do.
Diffstat (limited to 'app/controllers/admin_general_controller.rb')
-rw-r--r-- | app/controllers/admin_general_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/admin_general_controller.rb b/app/controllers/admin_general_controller.rb index cbe92a5ad..2c961dfc5 100644 --- a/app/controllers/admin_general_controller.rb +++ b/app/controllers/admin_general_controller.rb @@ -81,9 +81,9 @@ class AdminGeneralController < AdminController def debug @http_auth_user = admin_http_auth_user @current_commit = `git log -1 --format="%H"` - @current_branch = `git branch | perl -ne 'print $1 if /^\* (.*)/'` + @current_branch = `git branch | perl -ne 'print $1 if /^\\* (.*)/'` @current_version = `git describe --always --tags` - repo = `git remote show origin -n | perl -ne 'print $1 if m{Fetch URL: .*github\.com[:/](.*)\.git}'` + repo = `git remote show origin -n | perl -ne 'print $1 if m{Fetch URL: .*github\\.com[:/](.*)\\.git}'` @github_origin = "https://github.com/#{repo}/tree/" @request_env = request.env end |