1
0
forked from rosa/hakurei

internal/pkg: optionally suppress init verbosity

This flag applies to every exec artifact cured by the cache. It has no effect on cure outcome.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-05 20:03:06 +09:00
parent 09d9f766a9
commit 5a26895a22
2 changed files with 5 additions and 0 deletions

View File

@@ -436,6 +436,7 @@ func (a *execArtifact) makeContainer(
if z.HostNet {
z.Hostname = "cure-net"
}
z.Quiet = flags&CSuppressInit != 0
z.Uid, z.Gid = (1<<10)-1, (1<<10)-1
z.Dir, z.Path, z.Args = a.dir, a.path, a.args
z.Env = slices.Concat(a.env, []string{EnvJobs + "=" + strconv.Itoa(jobs)})

View File

@@ -617,6 +617,10 @@ const (
// CPromoteVariant allows [pkg.Open] to promote an unextended on-disk cache
// to the current extension variant. This is a one-way operation.
CPromoteVariant
// CSuppressInit arranges for verbose output of the container init to be
// suppressed regardless of [message.Msg] state.
CSuppressInit
)
// toplevel holds [context.WithCancel] over caller-supplied context, where all