From 7df692f5bc53e362bb7a622d5c543b72dd1990bd Mon Sep 17 00:00:00 2001 From: Yutaka Date: Sun, 28 Aug 2022 14:15:57 +0900 Subject: [PATCH] fixed: ShellExecutor for linux --- Sources/DangerSwiftPeriphery/ShellExecutor.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/DangerSwiftPeriphery/ShellExecutor.swift b/Sources/DangerSwiftPeriphery/ShellExecutor.swift index c0533e9..2db2210 100644 --- a/Sources/DangerSwiftPeriphery/ShellExecutor.swift +++ b/Sources/DangerSwiftPeriphery/ShellExecutor.swift @@ -30,7 +30,13 @@ struct ShellExecutor: ShellExecutable { let env = ProcessInfo.processInfo.environment let task = Process() + + #if os(macOS) task.launchPath = env["SHELL"] + #else + task.launchPath = "/bin/sh" + #endif + task.arguments = ["-l", "-c", script] task.currentDirectoryPath = FileManager.default.currentDirectoryPath