Skip to content

Commit 6a31046

Browse files
committed
fix message
1 parent 7246c65 commit 6a31046

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

k

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,11 +1902,12 @@ def secrets_create
19021902
namespace_prefix = namespace == "default" ? "" : "#{namespace}__"
19031903
secret_path = "applications/shared-secrets/#{namespace_prefix}#{secret}.yaml"
19041904

1905+
optional_namespace_in_cli_command = namespace == "default" ? "" : " #{namespace}"
1906+
19051907
if File.exist?(secret_path)
1906-
abort "Error: A secret named '#{secret}' in namespace #{namespace} already exists, run 'k secrets:edit #{secret}#{optional_namespace}' to edit it"
1908+
abort "Error: A secret named '#{secret}' in namespace #{namespace} already exists, run 'k secrets:edit #{secret}#{optional_namespace_in_cli_command}' to edit it"
19071909
end
19081910

1909-
optional_namespace_in_cli_command = namespace == "default" ? "" : " #{namespace}"
19101911
tmp_file = "/#{Dir.tmpdir}/#{namespace_prefix}#{secret}.yaml"
19111912
File.write(
19121913
tmp_file,

0 commit comments

Comments
 (0)