Skip to content

Commit 0625ac3

Browse files
author
Jon Yurek
committed
Refactor the previous commit a little
1 parent a2d01c4 commit 0625ac3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎lib/cocaine/command_line.rb‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ def interpolation(vars, key)
8080
def shell_quote(string)
8181
return "" if string.nil?
8282
if self.class.unix?
83-
string.empty? ? "''" : string.split("'").map{|m| "'#{m}'" }.join("\\'")
83+
if string.empty?
84+
"''"
85+
else
86+
string.split("'").map{|m| "'#{m}'" }.join("\\'")
87+
end
8488
else
8589
%{"#{string}"}
8690
end

0 commit comments

Comments
 (0)