-
Notifications
You must be signed in to change notification settings - Fork 54
feat: add 'duffle creds edit' #356
feat: add 'duffle creds edit' #356
Conversation
ee4ce05
to
d509068
Compare
Add an editor for editing the credentialsets that exist in your home directory. This delegates all of the heavy lifting to the Survey module, which provides a cross-platform editor feature. Closes #245
d509068
to
29fc504
Compare
Long: credentialEditDesc, | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
edit.home = home.Home(homePath()) | ||
edit.name = args[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should error out if the provided credential name is empty - right now, it simply exits, without any additional information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ Ugh... I forgot to set the arg count flag. Thx. I'll fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per the comment, duffle creds edit
should error out when no credential set name is provided.
A couple of additional comments regarding the editor used:
However, these issues would have to be fixed upstream, in the survey library, and should not prevent this PR from getting merged. |
I can confirm that when I did |
Ready for re-review |
@@ -36,6 +36,7 @@ func newCredentialEditCmd(w io.Writer) *cobra.Command { | |||
Use: "edit [NAME]", | |||
Short: "edit an existing credential set", | |||
Long: credentialEditDesc, | |||
Args: cobra.ExactArgs(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add an editor for editing the credentialsets that exist in your home directory.
This delegates all of the heavy lifting to the Survey module, which provides a cross-platform editor feature.
Closes #245