Skip to content

Commit

Permalink
fixed: ShellExecutor for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
taji-taji committed Aug 28, 2022
1 parent 27bfe4b commit 7df692f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/DangerSwiftPeriphery/ShellExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7df692f

Please sign in to comment.