Skip to content

Commit cf20e60

Browse files
committed
fix windows again
1 parent 8bcf91a commit cf20e60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/swsh/FDWrapperCommand.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ internal class FDWrapperCommand: Command {
7272
return .success(fdMap: [dstFd: io.fileDescriptor], ref: io)
7373
#else
7474
*/
75-
var pmode: mode_t = 0o666
7675
#if os(Windows)
77-
pmode = mode_t(_S_IREAD | _S_IWRITE)
76+
let pmode: Int32 = _S_IREAD | _S_IWRITE
7877
let path = path == "/dev/null" ? "NUL" : path
78+
#else
79+
let pmode: mode_t = 0o666
7980
#endif
8081
printOSCall("open", path, oflag, pmode)
8182
let fd = open(path, oflag, pmode)

0 commit comments

Comments
 (0)