diff --git a/lib/kamal/utils.rb b/lib/kamal/utils.rb index ab8dd50e..58daaa91 100644 --- a/lib/kamal/utils.rb +++ b/lib/kamal/utils.rb @@ -12,6 +12,8 @@ def argumentize(argument, attributes, sensitive: false) attr = "#{key}=#{escape_shell_value(value)}" attr = self.sensitive(attr, redaction: "#{key}=[REDACTED]") if sensitive [ argument, attr ] + elsif value == false + [ argument, "#{key}=false" ] else [ argument, key ] end diff --git a/test/utils_test.rb b/test/utils_test.rb index e292e980..a8fa0797 100644 --- a/test/utils_test.rb +++ b/test/utils_test.rb @@ -2,8 +2,8 @@ class UtilsTest < ActiveSupport::TestCase test "argumentize" do - assert_equal [ "--label", "foo=\"\\`bar\\`\"", "--label", "baz=\"qux\"", "--label", :quux ], \ - Kamal::Utils.argumentize("--label", { foo: "`bar`", baz: "qux", quux: nil }) + assert_equal [ "--label", "foo=\"\\`bar\\`\"", "--label", "baz=\"qux\"", "--label", :quux, "--label", "quuz=false" ], \ + Kamal::Utils.argumentize("--label", { foo: "`bar`", baz: "qux", quux: nil, quuz: false }) end test "argumentize with redacted" do