Add regression coverage for app lookup open targets

This commit is contained in:
Lawrence Chen 2026-03-17 15:06:12 -07:00 committed by Lawrence Chen
parent 93d2245a97
commit bb6dacf20d
2 changed files with 39 additions and 5 deletions

View file

@ -417,11 +417,13 @@ enum TerminalDirectoryOpenTarget: String, CaseIterable {
let homeDirectoryPath: String
let fileExistsAtPath: (String) -> Bool
let isExecutableFileAtPath: (String) -> Bool
let applicationPathForName: (String) -> String?
static let live = DetectionEnvironment(
homeDirectoryPath: FileManager.default.homeDirectoryForCurrentUser.path,
fileExistsAtPath: { FileManager.default.fileExists(atPath: $0) },
isExecutableFileAtPath: { FileManager.default.isExecutableFile(atPath: $0) }
isExecutableFileAtPath: { FileManager.default.isExecutableFile(atPath: $0) },
applicationPathForName: { NSWorkspace.shared.fullPath(forApplication: $0) }
)
}