diff --git a/envbuilder.go b/envbuilder.go index ea1031c..ad2c84f 100644 --- a/envbuilder.go +++ b/envbuilder.go @@ -815,7 +815,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro if err != nil { return err } - return os.Chown(path, execArgs.UserInfo.uid, execArgs.UserInfo.gid) + return os.Lchown(path, execArgs.UserInfo.uid, execArgs.UserInfo.gid) }); chownErr != nil { opts.Logger(log.LevelError, "chown %q: %s", execArgs.UserInfo.user.HomeDir, chownErr.Error()) endStage("⚠️ Failed to the ownership of the workspace, you may need to fix this manually!") @@ -832,7 +832,7 @@ func run(ctx context.Context, opts options.Options, execArgs *execArgsInfo) erro if err != nil { return err } - return os.Chown(path, execArgs.UserInfo.uid, execArgs.UserInfo.gid) + return os.Lchown(path, execArgs.UserInfo.uid, execArgs.UserInfo.gid) }); chownErr != nil { opts.Logger(log.LevelError, "chown %q: %s", execArgs.UserInfo.user.HomeDir, chownErr.Error()) endStage("⚠️ Failed to update ownership of %s, you may need to fix this manually!", execArgs.UserInfo.user.HomeDir)