-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
bugSomething isn't workingSomething isn't workinglifecycle/doneCompleted and mergedCompleted and merged
Description
Description
`swamp vault put` fails with `TooManyArgumentsError` when the secret value contains characters that the CLI argument parser interprets as separate arguments. GCP access tokens (from `gcloud auth print-access-token`) consistently trigger this.
Steps to Reproduce
```bash
TOKEN=$(gcloud auth print-access-token)
swamp vault put gcp-oauth GCP_ACCESS_TOKEN "$TOKEN"
```
Error:
```
TooManyArgumentsError: Too many arguments: ya29.a0Aa7MYio7IUnvZ...
```
Also fails with:
- `swamp vault put gcp-oauth GCP_ACCESS_TOKEN "'$TOKEN'"`
- `gcloud auth print-access-token | swamp vault put gcp-oauth GCP_ACCESS_TOKEN --stdin` (no `--stdin` flag exists)
Workaround
Store directly in 1Password, bypassing swamp:
```bash
op item edit GCP_ACCESS_TOKEN --vault swamp "password=$(gcloud auth print-access-token)"
```
Proposed Solution
Either:
- Accept the value as a single positional argument regardless of content (stop parsing after the third positional arg)
- Add `--stdin` or `--value-file` support for piping secret values
- Both
Environment
- swamp: `20260325.232536.0-sha.eb02760e`
- Shell: zsh
- OS: macOS Darwin 25.4.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglifecycle/doneCompleted and mergedCompleted and merged