Skip to content

Commit

Permalink
fixup! Config: Fix config version downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Jan 20, 2025
1 parent c95defc commit 7d0cb0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func main() {
if cmd == "encrypt" && isEncrypted {
fatal("Error: File is already encrypted")
}
if cmd == "decrypt" && !isEncrypted {
fatal("Error: File is already decrypted")
}

if len(key) == 0 && (isEncrypted || cmd == "encrypt") {
if key, err = config.PromptForConfigKey(cmd == "encrypt"); err != nil {
Expand Down

0 comments on commit 7d0cb0e

Please sign in to comment.