Skip to content

Commit 826125c

Browse files
committed
Remove swift-log dependency
1 parent 3791236 commit 826125c

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

Package.resolved

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@ let package = Package(
1515
.library(name: "ShellOut", targets: ["ShellOut"])
1616
],
1717
dependencies: [
18-
.package(url: "https://github.com/SwiftPackageIndex/ShellQuote", from: "1.0.2"),
19-
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
18+
.package(url: "https://github.com/SwiftPackageIndex/ShellQuote", from: "1.0.2")
2019
],
2120
targets: [
2221
.target(
2322
name: "ShellOut",
2423
dependencies: [
25-
.product(name: "ShellQuote", package: "ShellQuote"),
26-
.product(name: "Logging", package: "swift-log"),
24+
.product(name: "ShellQuote", package: "ShellQuote")
2725
],
2826
path: "Sources"
2927
),

Sources/ShellOut.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import Foundation
88
import Dispatch
9-
import Logging
109

1110
// MARK: - API
1211

@@ -34,7 +33,6 @@ import Logging
3433
arguments: [Argument] = [],
3534
at path: String = ".",
3635
process: Process = .init(),
37-
logger: Logger? = nil,
3836
outputHandle: FileHandle? = nil,
3937
errorHandle: FileHandle? = nil,
4038
environment: [String : String]? = nil,
@@ -44,7 +42,6 @@ import Logging
4442

4543
return try process.launchBash(
4644
with: command,
47-
logger: logger,
4845
outputHandle: outputHandle,
4946
errorHandle: errorHandle,
5047
environment: environment,
@@ -93,7 +90,6 @@ import Logging
9390
to command: ShellOutCommand,
9491
at path: String = ".",
9592
process: Process = .init(),
96-
logger: Logger? = nil,
9793
outputHandle: FileHandle? = nil,
9894
errorHandle: FileHandle? = nil,
9995
environment: [String : String]? = nil,
@@ -104,7 +100,6 @@ import Logging
104100
arguments: command.arguments,
105101
at: path,
106102
process: process,
107-
logger: logger,
108103
outputHandle: outputHandle,
109104
errorHandle: errorHandle,
110105
environment: environment,
@@ -440,7 +435,6 @@ extension ShellOutCommand {
440435
private extension Process {
441436
@discardableResult func launchBash(
442437
with command: String,
443-
logger: Logger? = nil,
444438
outputHandle: FileHandle? = nil,
445439
errorHandle: FileHandle? = nil,
446440
environment: [String : String]? = nil,
@@ -498,9 +492,7 @@ private extension Process {
498492
try self.run()
499493
self.waitUntilExit()
500494

501-
if outputGroup.wait(timeout: .now() + eofTimeout) == .timedOut {
502-
logger?.warning("ShellOut.launchBash: Timed out waiting for EOF! (command: \(command))")
503-
}
495+
_ = outputGroup.wait(timeout: .now() + eofTimeout)
504496

505497
// We know as of this point that either all blocks have been submitted to the
506498
// queue already, or we've reached our wait timeout.

0 commit comments

Comments
 (0)