Commit e2b27e0
Raylan LIN
fix(music): add output-format validation, handle missing audio_url, add trailing newline
- Validate --output-format is 'hex' or 'url' before sending to API
- Throw CLIError when URL output requested but API returns no audio_url
(previously wrote 0-byte empty file silently)
- Use console.log for URL output to include trailing newline (W2 fix)
- Simplify: quiet mode already gets clean URL, non-quiet gets JSON/text
via formatOutput — no need for separate branches1 parent e364c36 commit e2b27e0
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
129 | 136 | | |
130 | 137 | | |
131 | 138 | | |
| |||
170 | 177 | | |
171 | 178 | | |
172 | 179 | | |
173 | | - | |
174 | | - | |
175 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
176 | 183 | | |
177 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
| |||
0 commit comments