rubocop: fix Style/CollectionCompact
This commit is contained in:
parent
556c81b540
commit
20b8fcd726
@ -100,12 +100,11 @@ class SystemCommand
|
|||||||
end
|
end
|
||||||
|
|
||||||
def env_args
|
def env_args
|
||||||
set_variables = env.reject { |_, value| value.nil? }
|
set_variables = env.compact.map do |name, value|
|
||||||
.map do |name, value|
|
sanitized_name = Shellwords.escape(name)
|
||||||
sanitized_name = Shellwords.escape(name)
|
sanitized_value = Shellwords.escape(value)
|
||||||
sanitized_value = Shellwords.escape(value)
|
"#{sanitized_name}=#{sanitized_value}"
|
||||||
"#{sanitized_name}=#{sanitized_value}"
|
end
|
||||||
end
|
|
||||||
|
|
||||||
return [] if set_variables.empty?
|
return [] if set_variables.empty?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user