From 0b6c79f3d38187c0ca283cea69a682b455f4cb10 Mon Sep 17 00:00:00 2001 From: SEPURI-SAI-KRISHNA Date: Fri, 26 Jun 2026 10:08:40 +0530 Subject: [PATCH] fix: propagate error from createDirectory in system start (#1785) - `SystemStart` used `try!` when creating the apiserver data directory. File system operations can fail for legitimate reasons: insufficient permissions, disk full, read-only volume. Crashing the process in these cases gives the user no actionable error message. - Replaced with `try` so the error propagates up and is surfaced cleanly. --- Sources/ContainerCommands/System/SystemStart.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ContainerCommands/System/SystemStart.swift b/Sources/ContainerCommands/System/SystemStart.swift index 4b3a9624..ca3b1a83 100644 --- a/Sources/ContainerCommands/System/SystemStart.swift +++ b/Sources/ContainerCommands/System/SystemStart.swift @@ -104,7 +104,7 @@ extension Application { let apiServerDataPath = appRoot.appending(FilePath.Component("apiserver")) let apiServerDataURL = URL(fileURLWithPath: apiServerDataPath.string) - try! FileManager.default.createDirectory(at: apiServerDataURL, withIntermediateDirectories: true) + try FileManager.default.createDirectory(at: apiServerDataURL, withIntermediateDirectories: true) var env = PluginLoader.filterEnvironment() env[ApplicationRoot.environmentName] = appRoot.string