Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 4672f09

Browse files
author
Faris Huskovic
committed
add deprecated warning to secrets command
1 parent 2d76240 commit 4672f09

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

internal/cmd/secrets.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ func secretsCmd() *cobra.Command {
2121
Short: "Interact with Coder Secrets",
2222
Long: "Interact with secrets objects owned by the active user.",
2323
Hidden: true,
24+
PersistentPreRun: func(cmd *cobra.Command, args []string) {
25+
clog.LogWarn(
26+
"The 'secrets' command is now deprecated",
27+
"It will be removed in the next minor release",
28+
)
29+
},
30+
Run: func(cmd *cobra.Command, args []string) {
31+
_ = cmd.Help()
32+
},
2433
}
2534
cmd.PersistentFlags().StringVar(&user, "user", coder.Me, "Specify the user whose resources to target")
2635
cmd.AddCommand(
@@ -79,6 +88,8 @@ coder secrets create aws-credentials --from-file ./credentials.json`,
7988
return nil
8089
},
8190
RunE: func(cmd *cobra.Command, args []string) error {
91+
clog.LogWarn("secrets is now deprecated and will be removed in the next minor release")
92+
8293
var (
8394
name = args[0]
8495
value string

0 commit comments

Comments
 (0)