Skip to content

Commit

Permalink
oci: fix --home when running as root or fakeroot (sylabs#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
preminger committed Apr 14, 2023
1 parent c1a276d commit 53fe6e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/pkg/runtime/launcher/oci/process_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ func (l *Launcher) getProcess(ctx context.Context, imgSpec imgspecv1.Image, imag
// --env flag can override --env-file and SINGULARITYENV_
rtEnv = mergeMap(rtEnv, l.cfg.Env)

// Ensure HOME points to the required home directory, even if it is a custom one.
rtEnv["HOME"] = l.cfg.HomeDir

cwd, err := l.getProcessCwd()
if err != nil {
return nil, err
Expand Down

0 comments on commit 53fe6e9

Please sign in to comment.