I have done the following
Steps to reproduce
- Build from source on main (
1d70dd6):
rm -rf test-data && make APP_ROOT=test-data all
- Create a read-only app-root directory:
mkdir -p /tmp/test-approot && chmod 555 /tmp/test-approot
- Run:
bin/container system start --app-root /tmp/test-approot
Current behavior
The process crashes with a fatal error and exit code 133:
ContainerCommands/SystemStart.swift:107: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=513 "You don't have permission to save the file "apiserver" in the folder "test-approot"." UserInfo={NSFilePath=/tmp/test-approot/apiserver, NSURL=file:///tmp/test-approot/apiserver, NSUnderlyingError=0x10836cbc0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
The crash is at line 107 of SystemStart.swift — a try! on FileManager.default.createDirectory. run() is already async throws, and every other call in the same function uses plain try and propagates errors normally. This one line does not.
Expected behavior
container system start should surface a clear error and exit cleanly — the same way every other failure in run() does.
Relevant log output
ContainerCommands/SystemStart.swift:107: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=513 "You don't have permission to save the file "apiserver" in the folder "test-approot"." UserInfo={NSFilePath=/tmp/test-approot/apiserver, NSURL=file:///tmp/test-approot/apiserver, NSUnderlyingError=0x10836cbc0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
Environment
- OS: macOS 26.5.1 (25F80)
- Xcode: Version 26.0 (17A324)
- Swift: Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
- Commit:
1d70dd6 (main)
- Build: debug (
make APP_ROOT=test-data all)
I have done the following
Steps to reproduce
1d70dd6):Current behavior
The process crashes with a fatal error and exit code 133:
The crash is at line 107 of
SystemStart.swift— atry!onFileManager.default.createDirectory.run()is alreadyasync throws, and every other call in the same function uses plaintryand propagates errors normally. This one line does not.Expected behavior
container system startshould surface a clear error and exit cleanly — the same way every other failure inrun()does.Relevant log output
Environment
1d70dd6(main)make APP_ROOT=test-data all)