Merge pull request #1045 from junket/allow-false-env-var-value
Allow false env var value
This commit is contained in:
@@ -12,6 +12,8 @@ module Kamal::Utils
|
||||
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
|
||||
|
||||
@@ -2,8 +2,8 @@ require "test_helper"
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user