Skip to content

Commit

Permalink
Fix initializer visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
leavez committed Mar 8, 2021
1 parent 09d8d60 commit 7c15c15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Sources/Shell/Runner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ public struct RunParams {
public var currentDirectory: String?
/// TerminationHandler will call before sync run finished, in another thread.
public var terminationHandler: ((Process) -> Void)?

public init() {}
}



/// - Parameters:
/// - executablePath: The absolute path to executable
/// - stdin: FileHandle or Pipe, if Pipe, it will automatically close
Expand Down
12 changes: 6 additions & 6 deletions Tests/ShellTests/RunnerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ final class RunnerTests: XCTestCase {
workspace = "/private" + workspace
}

let params = RunParams(
environment: ["PATH": "/bin"],
currentDirectory: workspace,
terminationHandler: { _ in
terminatedCalled = true
})
var params = RunParams()
params.environment = ["PATH": "/bin"]
params.currentDirectory = workspace
params.terminationHandler = { _ in
terminatedCalled = true
}

let p1 = Pipe()
let (_, _ , wait) = try runInner("/bin/bash", args: ["-c", "pwd; echo $PATH"], stdin: nil, stdout: p1, stderr: nil, otherParams: params)
Expand Down

0 comments on commit 7c15c15

Please sign in to comment.