Commit 2ba73ef
fix: accept secret value as separate argument in vault put (#881)
## Summary
- Changed `vault put` argument signature from `<vault_name> <key_value>`
to `<vault_name> <key> [value]` so users can pass the secret as a
separate positional argument
- When 3 args given, treats arg2 as key and arg3 as value directly (no
`KEY=VALUE` parsing needed)
- When 2 args given, maintains full backward compatibility: `KEY=VALUE`
format, stdin piping, and interactive prompt all still work
- Updated error message to mention all three input methods including the
new 3-arg form
## Test Plan
- [x] All 3564 existing tests pass
- [x] Updated test for new error message format (now mentions `<key>
<value>` form)
- [x] `deno check`, `deno lint`, `deno fmt` all clean
- [ ] Manual test: `swamp vault put <vault> KEY value` works
- [ ] Manual test: `swamp vault put <vault> KEY=value` still works
(backward compat)
- [ ] Manual test: `echo "value" | swamp vault put <vault> KEY` still
works
Closes #880
Co-authored-by: Blake Irvin <bixu@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Blake Irvin <bixu@users.noreply.github.com>1 parent 0105b5a commit 2ba73ef
2 files changed
Lines changed: 47 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | | - | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | | - | |
129 | | - | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
159 | 140 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
163 | 175 | | |
164 | | - | |
165 | | - | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
0 commit comments