Open
Description
Description
The REPL scrubs TMP
, TEMP
, and USERPROFILE
from the environment when it launches. This is problematic for Windows as these are important to certain API usage.
Steps to reproduce
swift repl
1> import Foundation
2> try "contents".write(toFile: "file.txt", atomically: true, encoding: .ascii)
Expected behavior
I expect this to be successful. However, this requires that the environment variables be set so that the Win32 APIs for computing the temporary directory function properly.
Environment
- Swift compiler version info:
Swift version 5.11-dev (LLVM fe9a485647a386d, Swift 104d19bca0ea745)
Target: x86_64-unknown-windows-msvc
- Xcode version info:
- Deployment target: Windows 11 22H2