Open edaniszewski opened 4 years ago
also related to this, when a key is not in envelope (e.g. no scuttle file yet) and something is being added with key passed as flag (and probably also via ENV), the warning shows up even if the key is passed in. this feels wrong, since I don't think we should be warning the user about needing to pass in the key when the key is already being passed in?
sctl add --key=project-key FOO_BAR
Enter the data you want to encrypt.. END with Enter and Ctrl+D
foob4r
WARN[0012] No KeyURI found in envelope. Required usage of flag/env config.
When running
sctl add
for a new key, I was prompted to input the secret in interactive prompt. After the secret was added, I got the warning and error for missing key. I think it makes sense to do this check before input is accepted so the user knows upfront that a required arg is missing before they attempt to input any secret.