fix(secrets): default delete --type to shared, matching set - #381
fix(secrets): default delete --type to shared, matching set#381solomonerous wants to merge 1 commit into
Conversation
infisical secrets set and infisical secrets get default to shared secrets, but secrets delete defaulted to personal. The common flow set then delete always failed with a misleading 404 'Secret not found' for ordinary shared secrets unless --type shared was passed explicitly. Flip the default to util.SECRET_TYPE_SHARED so delete matches the rest of the secrets command group, and drop the now-stale manual '(default: personal)' suffix in the flag help (cobra prints the actual default). Fixes Infisical/infisical#7805
|
| Filename | Overview |
|---|---|
| packages/cmd/secrets.go | The delete command now sends type: "shared" when --type is omitted; explicit personal and shared selections remain available, and no actionable defect was found. |
Reviews (1): Last reviewed commit: "fix(secrets): default delete --type to s..." | Re-trigger Greptile
|
Heads up that this overlaps with #375, which I opened on 26 August with the same change to The one difference is that #375 also adds |
Fixes Infisical/infisical#7805
infisical secrets setandinfisical secrets getdefault to--type shared, butinfisical secrets deletedefaults to--type personal. So the obvious flow - set a secret, then delete it - always fails with a 404 "Secret not found" unless you remember to pass--type shared, and the error gives no hint that the type is the problem.This flips the delete default to
util.SECRET_TYPE_SHAREDso it matches the rest of the group, and drops the manual "(default: personal)" suffix in the flag help since cobra prints the actual default anyway.Builds clean (
go build ./packages/cmd/);go vetonly reports the four pre-existingrun.goformat-string warnings that are already onmain.If maintainers would rather not change the default, two alternatives I'm happy to implement instead: fall back to
sharedwhen the personal lookup 404s, or keep the defaults and just make the 404 message mention--type.