mirror of
https://github.com/apple/container.git
synced 2026-09-28 01:46:25 -04:00
Centralize utilities for configuration loading and path parsing (#1448)
This creates a more centralized utility to find and load configuration files, as a follow up to (pr: https://github.com/apple/container/pull/1425).
This commit is contained in:
@@ -109,9 +109,7 @@ extension Application {
|
||||
}
|
||||
|
||||
public mutating func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
try await DeleteImageImplementation.removeImage(options: options, containerSystemConfig: containerSystemConfig, log: log)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@ extension Application {
|
||||
}
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
var printable: [ImageDetail] = []
|
||||
var succeededImages: [String] = []
|
||||
var allErrors: [(String, Error)] = []
|
||||
|
||||
@@ -45,9 +45,7 @@ extension Application {
|
||||
public var logOptions: Flags.Logging
|
||||
|
||||
public mutating func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
try Self.validate(format: format, quiet: quiet, verbose: verbose)
|
||||
|
||||
var images = try await ClientImage.list().filter { img in
|
||||
|
||||
@@ -69,9 +69,7 @@ extension Application {
|
||||
}
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
let p = try DefaultPlatform.resolve(platform: platform, os: os, arch: arch, log: log)
|
||||
|
||||
let scheme = try RequestScheme(registry.scheme)
|
||||
|
||||
@@ -57,9 +57,7 @@ extension Application {
|
||||
public init() {}
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
let p = try DefaultPlatform.resolve(platform: platform, os: os, arch: arch, log: log)
|
||||
|
||||
let scheme = try RequestScheme(registry.scheme)
|
||||
|
||||
@@ -62,9 +62,7 @@ extension Application {
|
||||
@Argument var references: [String]
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
let p = try DefaultPlatform.resolve(platform: platform, os: os, arch: arch, log: log)
|
||||
|
||||
let progressConfig = try ProgressConfig(
|
||||
|
||||
@@ -36,9 +36,7 @@ extension Application {
|
||||
public var logOptions: Flags.Logging
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
|
||||
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
|
||||
)
|
||||
let containerSystemConfig: ContainerSystemConfig = try ConfigurationLoader.load()
|
||||
let existing = try await ClientImage.get(reference: source, containerSystemConfig: containerSystemConfig)
|
||||
let targetReference = try ClientImage.normalizeReference(target, containerSystemConfig: containerSystemConfig)
|
||||
try await existing.tag(new: targetReference)
|
||||
|
||||
Reference in New Issue
Block a user