File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010 "os/exec"
1111 "path/filepath"
1212 "strings"
13+ "syscall"
1314 "time"
1415)
1516
@@ -29,17 +30,15 @@ var defaultEnvVars = []string{
2930}
3031
3132func (p Plugin ) Exec () error {
33+ // set umask to 0 so cloned files are
34+ // accessible from non-root containers
35+ syscall .Umask (0 )
36+
3237 if p .Pipeline .Path != "" {
3338 err := os .MkdirAll (p .Pipeline .Path , 0o777 )
3439 if err != nil {
3540 return err
3641 }
37-
38- // Ensure the correct mode for the path. This is also necessary if the path does not exist
39- // and was created by os.MkdirAll. This is due to the fact that the permissions set by os.MkdirAll
40- // are filtered by the system umask (usually 0022). As we need an additional chmod anyway,
41- // we do not mess around with the system umask.
42- os .Chmod (p .Pipeline .Path , 0o777 )
4342 }
4443
4544 err := writeNetrc (p .Config .Home , p .Netrc .Machine , p .Netrc .Login , p .Netrc .Password )
You can’t perform that action at this time.
0 commit comments