From 2d77f647bf38a65ceeda3d5c9adcb523a278f00b Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 9 Sep 2025 12:01:37 +0200 Subject: [PATCH] Report proper error --- Sources/Subprocess/Platforms/Subprocess+Darwin.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Subprocess/Platforms/Subprocess+Darwin.swift b/Sources/Subprocess/Platforms/Subprocess+Darwin.swift index 95645bc..5182ee5 100644 --- a/Sources/Subprocess/Platforms/Subprocess+Darwin.swift +++ b/Sources/Subprocess/Platforms/Subprocess+Darwin.swift @@ -393,8 +393,8 @@ extension Configuration { ) } else { error = SubprocessError( - code: .init(.spawnFailed), - underlyingError: .init(rawValue: spawnAttributeError) + code: .init(.failedToChangeWorkingDirectory(self.workingDirectory?.string ?? "unknown")), + underlyingError: .init(rawValue: chdirError) ) } throw error