Skip to content

Commit 5a74d25

Browse files
committed
fixup! fix(envbuilder): make init command more readable
1 parent 8635f11 commit 5a74d25

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

envbuilder.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,10 @@ func Run(ctx context.Context, opts options.Options, preExec ...func()) error {
105105
return fmt.Errorf("set uid: %w", err)
106106
}
107107

108-
initCmd := append([]string{opts.InitCommand}, args.InitArgs...)
109-
opts.Logger(log.LevelInfo, "=== Running init command as user %q", args.UserInfo.user.Username)
110-
for _, line := range wordwrap.WrapString(initCmd, 76) {
111-
opts.Logger(log.LevelInfo, " "+line)
112-
}
108+
initCmd := strings.Join(append([]string{opts.InitCommand}, args.InitArgs...), " ")
109+
opts.Logger(log.LevelInfo, "=== Running init command as user %q:", args.UserInfo.user.Username)
110+
opts.Logger(log.LevelInfo, wordwrap.WrapString(initCmd, 80))
111+
opts.Logger(log.LevelInfo, "===")
113112
for _, fn := range preExec {
114113
fn()
115114
}

0 commit comments

Comments
 (0)