Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'config' option usage in CLI #455

Merged
merged 1 commit into from May 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/i18n/tasks/cli.rb
Expand Up @@ -36,11 +36,12 @@ def start(argv)
def run(argv)
argv.each_with_index do |arg, i|
if ['--config', '-c'].include?(arg)
if File.exist?(argv[i + 1])
@config_file = argv[i + 1]
_, config_file = argv.slice!(i, 2)
if File.exist?(config_file)
@config_file = config_file
break
else
error "Config file doesn't exist: #{argv[i + 1]}", 128
error "Config file doesn't exist: #{config_file}", 128
end
end
end
Expand Down