Repository navigation
Commit 0e90b25
committed
fix(output): open device and pipe targets without O_TRUNC (#208)
Windows rejects O_TRUNC on the NUL device with ERROR_INVALID_FUNCTION, so
-o NUL, -stats NUL and -sarif NUL failed with "open NUL: Incorrect
function." and exit 1. Truncating a device or pipe is meaningless, so drop
the flag; the direct-write branch already handles non-regular targets.
Drops the Windows skip in TestCreateFileWritesNonRegularTargetDirectly: it
now exercises the NUL device on Windows too.
Signed-off-by: bfs2021 <101915083+bfs2021@users.noreply.github.com>1 parent 28de702 commit 0e90b25
2 files changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | 99 | | |
104 | 100 | | |
105 | 101 | | |
| |||
0 commit comments