From 3ac75627910232ac761e8e932a2850123243d5a3 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Mon, 18 May 2026 20:42:05 +0200 Subject: [PATCH] macOS: set error when there is no directory to open with --- macos/Sources/Features/Services/ServiceProvider.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/macos/Sources/Features/Services/ServiceProvider.swift b/macos/Sources/Features/Services/ServiceProvider.swift index 2ec4e473c..fd3e8e9cc 100644 --- a/macos/Sources/Features/Services/ServiceProvider.swift +++ b/macos/Sources/Features/Services/ServiceProvider.swift @@ -52,6 +52,11 @@ class ServiceProvider: NSObject { } ) + guard !directoryURLs.isEmpty else { + error.pointee = Self.errorNoString + return + } + for url in directoryURLs { var config = Ghostty.SurfaceConfiguration() config.workingDirectory = url.path(percentEncoded: false)