Skip to content

Commit b574060

Browse files
committed
Remove Current.shell
1 parent 10fb306 commit b574060

File tree

5 files changed

+3
-36
lines changed

5 files changed

+3
-36
lines changed

Sources/App/Core/AppEnvironment.swift

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import FoundationNetworking
2525
struct AppEnvironment: Sendable {
2626
var logger: @Sendable () -> Logger
2727
var setLogger: @Sendable (Logger) -> Void
28-
var shell: Shell
2928
}
3029

3130

@@ -34,16 +33,7 @@ extension AppEnvironment {
3433

3534
static let live = AppEnvironment(
3635
logger: { logger },
37-
setLogger: { logger in Self.logger = logger },
38-
shell: .live
39-
)
40-
}
41-
42-
43-
44-
@available(*, deprecated)
45-
struct Shell: Sendable {
46-
static let live: Self = .init(
36+
setLogger: { logger in Self.logger = logger }
4737
)
4838
}
4939

Tests/AppTests/GitLiveTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class GitLiveTests: XCTestCase {
3434
// Simulate a class setUp (which does not exist as an async function)
3535
if Self.hasRunSetup { return }
3636
Self.hasRunSetup = true
37-
Current.shell = .live
3837
try! Foundation.FileManager.default.createDirectory(atPath: Self.tempDir, withIntermediateDirectories: false, attributes: nil)
3938
try! await ShellOut.shellOut(to: .init(command: "unzip", arguments: [Self.sampleGitRepoZipFile]), at: Self.tempDir)
4039
}

Tests/AppTests/Mocks/AppEnvironment+mock.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ extension AppEnvironment {
2323
static func mock(eventLoop: EventLoop) -> Self {
2424
.init(
2525
logger: { logger },
26-
setLogger: { logger in Self.logger = logger },
27-
shell: .mock
26+
setLogger: { logger in Self.logger = logger }
2827
)
2928
}
3029
}

Tests/AppTests/Mocks/AppShell+mock.swift

Lines changed: 0 additions & 21 deletions
This file was deleted.

Tests/AppTests/ReAnalyzeVersionsTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ReAnalyzeVersionsTests: AppTestCase {
8888
XCTAssertEqual(versions.map { $0.targets.map(\.name) } , [[], []])
8989
XCTAssertEqual(versions.map(\.releaseNotes) , [nil, nil])
9090
}
91-
91+
9292
try await withDependencies {
9393
// Update state that would normally not be affecting existing versions, effectively simulating the situation where we only started parsing it after versions had already been created
9494
$0.shell.run = { @Sendable cmd, path in

0 commit comments

Comments
 (0)