@@ -151,11 +151,6 @@ export class Job {
151151 this . rules = jobData . rules || null ;
152152 this . environment = typeof jobData . environment === "string" ? { name : jobData . environment } : jobData . environment ;
153153
154- // HACK: So that this won't show up in the preview variables
155- if ( ! argv . preview ) {
156- globalVariables [ "FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR" ] = argv . umask ? "false" : "true" ;
157- }
158-
159154 const matrixVariables = opt . matrixVariables ?? { } ;
160155 const fileVariables = Utils . findEnvMatchedVariables ( variablesFromFiles , this . fileVariablesDir ) ;
161156 this . _variables = { ...globalVariables , ...jobVariables , ...matrixVariables , ...predefinedVariables , ...fileVariables , ...argvVariables } ;
@@ -494,7 +489,7 @@ export class Job {
494489
495490 let chownOpt = "0:0" ;
496491 let chmodOpt = "a+rw" ;
497- if ( expanded [ "FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR" ] === "true" ) {
492+ if ( this . argv . umask === false ) {
498493 const { stdout} = await Utils . spawn ( [ "docker" , "run" , "--rm" , "--entrypoint" , "sh" , imageName , "-c" , "echo \"$(id -u):$(id -g)\"" ] ) ;
499494 chownOpt = stdout ;
500495 if ( chownOpt == "0:0" ) {
@@ -705,7 +700,7 @@ export class Job {
705700 dockerCmd += `--ulimit nofile=${ this . argv . ulimit } ` ;
706701 }
707702
708- if ( expanded [ "FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR" ] === "false" ) {
703+ if ( this . argv . umask === true ) {
709704 dockerCmd += "--user 0:0 " ;
710705 }
711706
@@ -1204,7 +1199,7 @@ export class Job {
12041199 let dockerCmd = `${ this . argv . containerExecutable } create --interactive ` ;
12051200 this . refreshLongRunningSilentTimeout ( writeStreams ) ;
12061201
1207- if ( expanded [ "FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR" ] === "false" ) {
1202+ if ( this . argv . umask === true ) {
12081203 dockerCmd += "--user 0:0 " ;
12091204 }
12101205
0 commit comments