feat: support multiple --path values in export command - #388
Open
mateuscmtropical wants to merge 1 commit into
Open
feat: support multiple --path values in export command#388mateuscmtropical wants to merge 1 commit into
mateuscmtropical wants to merge 1 commit into
Conversation
|
✅ CLA satisfied. All contributors have signed the current CLA. The |
Contributor
|
| Filename | Overview |
|---|---|
| packages/cmd/export.go | Adds repeatable paths, ordered secret merging, and post-merge tag filtering without an established correctness or SSRF issue. |
| packages/cmd/export_test.go | Covers repeatable flag behavior, last-value precedence, sorting, and tag filtering after duplicate resolution. |
| packages/util/log.go | Uses errors.As so wrapped API errors continue through the existing formatted-error path. |
Reviews (1): Last reviewed commit: "cli: support multiple --path values in e..." | Re-trigger Greptile
`run` already supported multiple `--path` flags. `export` only took one. This brings `export` up to the same behavior: `--path` is now a StringArray (matching run.go), reuses run.go's fetchSecrets to fetch secrets from each path, and merges duplicate keys across paths (last path wins). Tag filtering now happens once, client-side, after the merge, instead of being applied per-path on the server -- otherwise a tagged value from an earlier path could survive over a later path's untagged override. Also fixes a related bug in error handling: wrapped API errors weren't unwrapped before the pretty-print check in PrintErrorAndExit, so failures showed a generic error instead of the formatted one. Closes Infisical/infisical#900
mateuscmtropical
force-pushed
the
feature/export-multi-path-v2
branch
from
September 4, 2026 23:24
46af36f to
6e30b6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description 📣
Implements #900 (specify multiple paths in the CLI).
runalready supported multiple--pathflags.exportonly took one. This bringsexportup to the same behavior:--pathis now aStringArray, matchingrun's existing flagrun'sfetchSecretsto fetch secrets from each pathType ✨
Tests 🛠️
Ran
go test ./packages/cmd/... -vet=off -count=2(all passing).Also tested manually against a real Infisical Cloud project: created two folders with overlapping and non-overlapping secret keys, some tagged and some not, and confirmed:
both return the expected merged/filtered result (last path wins on key collisions, tag filtering applied after merge).