Skip to content
Snippets Groups Projects
Commit 20b8fcd7 authored by Jonathan Chang's avatar Jonathan Chang
Browse files

rubocop: fix Style/CollectionCompact

parent 556c81b5
No related branches found
No related tags found
No related merge requests found
......@@ -100,12 +100,11 @@ class SystemCommand
end
def env_args
set_variables = env.reject { |_, value| value.nil? }
.map do |name, value|
sanitized_name = Shellwords.escape(name)
sanitized_value = Shellwords.escape(value)
"#{sanitized_name}=#{sanitized_value}"
end
set_variables = env.compact.map do |name, value|
sanitized_name = Shellwords.escape(name)
sanitized_value = Shellwords.escape(value)
"#{sanitized_name}=#{sanitized_value}"
end
return [] if set_variables.empty?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment