Repository navigation
Commit 8628c6d
committed
fix(cli): read @file arguments saved as UTF-16LE or with a byte-order mark
Windows PowerShell 5.1 writes `>` redirects as UTF-16LE with a byte-order
mark, and `Out-File -Encoding utf8` writes UTF-8 with one. The documented
`sim workflows export ... > workflow.json` then
`workflows import-preview --workflow @workflow.json` failed there with
"--workflow must be valid JSON". @file and @- input is now decoded as
UTF-16LE when it starts with that mark, and a leading mark is dropped
either way, as the embedded reader's TextDecoder already does.1 parent 293ec1b commit 8628c6d
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
208 | 224 | | |
209 | 225 | | |
210 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
227 | 237 | | |
228 | 238 | | |
229 | 239 | | |
| |||
0 commit comments