feat(cli): validate prerequisites and seal installation plans

This commit is contained in:
Codex
2026-09-28 17:03:25 +02:00
parent b9c3369e7b
commit 55f3569e55
30 changed files with 2271 additions and 4 deletions
+14 -1
View File
@@ -59,7 +59,17 @@ type boundedStreamingRunner interface {
// execRunner executes the Docker CLI. It never invokes a shell.
type execRunner struct {
binary string
binary string
environment []string
}
// NewRunnerWithEnvironment uses an explicit process environment, for document-owned Compose
// configuration that must not inherit unrelated operator shell parameter overrides.
func NewRunnerWithEnvironment(binary string, environment []string) Runner {
if binary == "" {
binary = "docker"
}
return execRunner{binary: binary, environment: append([]string{}, environment...)}
}
// NewRunner returns a runner for binary. An empty binary selects docker from PATH.
@@ -106,6 +116,9 @@ func (r execRunner) runBounded(ctx context.Context, args []string, stdin io.Read
}
}
command := exec.Command(r.binary, preparedArgs...)
if r.environment != nil {
command.Env = r.environment
}
configureProcess(command)
command.Stdin = stdin
overflow := make(chan struct{}, 1)