Skip to content
Open
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
7 changes: 2 additions & 5 deletions Sources/ContainerCommands/Image/ImageLoad.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import ArgumentParser
import ContainerAPIClient
import Containerization
import ContainerizationError
import ContainerizationOS
import Foundation
import SystemPackage
import TerminalProgress
Expand All @@ -33,11 +34,7 @@ extension Application {
@Option(
name: .shortAndLong, help: "Path to the image tar archive", completion: .file(),
transform: { str in
let path = FilePath(str)
guard path.isRelative else { return path.lexicallyNormalized() }
return FilePath(FileManager.default.currentDirectoryPath)
.pushing(path)
.lexicallyNormalized()
FilePathOps.absolutePath(FilePath(str))
})
var input: FilePath?

Expand Down
7 changes: 2 additions & 5 deletions Sources/ContainerCommands/Image/ImageSave.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import ContainerResource
import Containerization
import ContainerizationError
import ContainerizationOCI
import ContainerizationOS
import Foundation
import SystemPackage
import TerminalProgress
Expand All @@ -48,11 +49,7 @@ extension Application {
@Option(
name: .shortAndLong, help: "Pathname for the saved image", completion: .file(),
transform: { str in
let path = FilePath(str)
guard path.isRelative else { return path.lexicallyNormalized() }
return FilePath(FileManager.default.currentDirectoryPath)
.pushing(path)
.lexicallyNormalized()
FilePathOps.absolutePath(FilePath(str))
})
var output: FilePath?

Expand Down