mirror of
https://github.com/apple/container.git
synced 2026-09-28 01:46:25 -04:00
Support use of custom app root with system config in CLI commands (#1600)
## Type of Change - [x] Bug fix ## Motivation and Context Many CLI commands need to reference the system configurations for `container`. Previously, CLI commands would try to load the system configurations from the default application root location, regardless of if `container` had been started with a custom application root location. This PR fixes that issue by having each CLI command ping the APIServer's health check service to get the correct app root path. Closes https://github.com/apple/container/issues/1576 ## Testing - [x] Tested locally Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This commit is contained in:
@@ -56,7 +56,7 @@ extension Application {
|
||||
var arguments: [String] = []
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try await ConfigurationLoader.load()
|
||||
let containerSystemConfig: ContainerSystemConfig = try await Application.loadContainerSystemConfig()
|
||||
let progressConfig = try ProgressConfig(
|
||||
showTasks: true,
|
||||
showItems: true,
|
||||
|
||||
@@ -63,7 +63,7 @@ extension Application {
|
||||
var arguments: [String] = []
|
||||
|
||||
public func run() async throws {
|
||||
let containerSystemConfig: ContainerSystemConfig = try await ConfigurationLoader.load()
|
||||
let containerSystemConfig: ContainerSystemConfig = try await Application.loadContainerSystemConfig()
|
||||
var exitCode: Int32 = 127
|
||||
let id = Utility.createContainerID(name: self.managementFlags.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user