Skip to content

Commit

Permalink
Working on #161
Browse files Browse the repository at this point in the history
  • Loading branch information
melonamin committed Feb 14, 2021
1 parent e42e8fe commit 8ccfc86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion SwiftBar/AppShared.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ class AppShared: NSObject {
return
}

let runInTerminalScript = getEnvExportString(env: env).appending(";").appending(script.escaped())
let runInTerminalScript = getEnvExportString(env: env).appending(";")
.appending(script.escaped())
.appending(" ")
.appending(args.joined(separator: " "))
var appleScript: String = ""
switch Preferences.shared.terminal {
case .Terminal:
Expand Down
5 changes: 3 additions & 2 deletions SwiftBar/Utility/RunScript.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ private extension Process {
arguments = args
} else {
executableURL = URL(fileURLWithPath: "/bin/bash")
arguments = ["-c", "-l", script.escaped()]
arguments?.append(contentsOf: args)
var argsFull = ["-c", "-l", script.escaped()]
argsFull.append(contentsOf: args)
arguments = argsFull
}

guard let executableURL = executableURL, FileManager.default.fileExists(atPath: executableURL.path) else {
Expand Down

0 comments on commit 8ccfc86

Please sign in to comment.