Commit 01cb0edd authored by Thong Kuah's avatar Thong Kuah

Use system instead of backticks for git command

Additionally we bypass the shell by splitting the args into tokens.
This has the effect of quoting 'locale/*/gitlab.po' which means that git
will only match against the working tree. So as we no longer attempt to
checkout a file that is unknown to git, the git error seen in
https://gitlab.com/gitlab-org/gitlab/-/issues/238208#note_407172042
is resolved.
parent 2df99177
......@@ -38,7 +38,7 @@ namespace :gettext do
Rake::Task['gettext:find'].invoke
# leave only the required changes.
unless system('git checkout -- locale/*/gitlab.po')
unless system(*%w(git checkout -- locale/*/gitlab.po))
raise 'failed to cleanup generated locale/*/gitlab.po files'
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment