Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .swiftpm/xcode/xcshareddata/xcschemes/Container-Compose.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Container-ComposeTests"
BuildableName = "Container-ComposeTests"
BlueprintName = "Container-ComposeTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down Expand Up @@ -57,17 +69,21 @@
argument = "up"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "down"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "-d"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "db"
isEnabled = "YES">
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--build"
isEnabled = "NO">
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--cwd=/Users/mcrich/Xcode/Assignment-Manager-API"
Expand Down
4 changes: 3 additions & 1 deletion Sources/Container-Compose/Commands/ComposeDown.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct ComposeDown: AsyncParsableCommand {
"docker-compose.yaml",
]
for filename in filenames {
if fileManager.fileExists(atPath: filename) {
if fileManager.fileExists(atPath: "\(cwd)/\(filename)") {
composeFilename = filename
break
}
Expand Down Expand Up @@ -117,11 +117,13 @@ public struct ComposeDown: AsyncParsableCommand {
do {
try await container.stop()
} catch {
print("Error Stopping Container: \(error)")
}
if remove {
do {
try await container.delete()
} catch {
print("Error Removing Container: \(error)")
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Container-Compose/Commands/ComposeUp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ public struct ComposeUp: AsyncParsableCommand, @unchecked Sendable {
do {
try await container.stop()
} catch {
print("Error Stopping Container: \(error)")
}
if remove {
do {
try await container.delete()
} catch {
print("Error Removing Container: \(error)")
}
}
}
Expand Down
18 changes: 18 additions & 0 deletions Sources/ContainerComposeApp/application.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// main.swift
// Container-Compose
//
// Created by Morris Richman on 6/18/25.
//

import ContainerComposeCore
import ArgumentParser

@main
struct Application: AsyncParsableCommand {
@Argument(parsing: .captureForPassthrough) var args: [String]

func run() async throws {
await Main.main(args)
}
}
10 changes: 0 additions & 10 deletions Sources/ContainerComposeApp/main.swift

This file was deleted.