Skip to content
Open
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
5 changes: 1 addition & 4 deletions Sources/Container-Compose/Commands/ComposeUp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,6 @@ public struct ComposeUp: AsyncParsableCommand, @unchecked Sendable {
let volumeUrl = URL.homeDirectory.appending(path: ".containers/Volumes/\(projectName)/\(source)")
let volumePath = volumeUrl.path(percentEncoded: false)

let destinationUrl = URL(fileURLWithPath: destination).deletingLastPathComponent()
let destinationPath = destinationUrl.path(percentEncoded: false)

print(
"Warning: Volume source '\(source)' appears to be a named volume reference. The 'container' tool does not support named volume references in 'container run -v' command. Linking to \(volumePath) instead."
)
Expand All @@ -702,7 +699,7 @@ public struct ComposeUp: AsyncParsableCommand, @unchecked Sendable {
// Host path exists and is a directory, add the volume
runCommandArgs.append("-v")
// Reconstruct the volume string without mode, ensuring it's source:destination
runCommandArgs.append("\(volumePath):\(destinationPath)") // Use original source for command argument
runCommandArgs.append("\(volumePath):\(destination)") // Use original source for command argument
}

return runCommandArgs
Expand Down