Skip to content

Commit a7ccc0a

Browse files
committed
pkg/tool/file: use 0o777 as the default Mkdir permissions
file.Create and file.Append already default to 0o666 rather than 0o644 to rely on the user's umask, but file.Mkdir was inconsistent in using 0o755 rather than 0o777. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I8f11fcc7bbd27bf34f78b41a3242af62f43cac07 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200570 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Matthew Sackman <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 05b9b02 commit a7ccc0a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: pkg/tool/file/file.cue

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Mkdir: {
8989
createParents: bool | *false
9090

9191
// Directory mode and permission bits (before umask).
92-
permissions: int | *0o755
92+
permissions: int | *0o777
9393
}
9494

9595
// MkdirAll creates a directory at the specified path along with any necessary

Diff for: pkg/tool/file/pkg.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: tools/flow/testdata/issue2416a.txtar

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ graph TD
7575
path: "output"
7676
createParents: true
7777
stdout: "foo"
78-
permissions: 493
78+
permissions: 511
7979
}
8080
-- out/run-v3/t2/value --
8181
{
@@ -84,7 +84,7 @@ graph TD
8484
path: "output"
8585
createParents: true
8686
stdout: "foo"
87-
permissions: 493
87+
permissions: 511
8888
}
8989
$id: "tool/file.Create"
9090
filename: "output/dns-records.zone"
@@ -107,7 +107,7 @@ diff old new
107107
path: "output"
108108
@@ -7,6 +6,7 @@
109109
stdout: "foo"
110-
permissions: 493
110+
permissions: 511
111111
}
112112
+ $id: "tool/file.Create"
113113
filename: "output/dns-records.zone"
@@ -139,7 +139,7 @@ graph TD
139139
path: "output"
140140
createParents: true
141141
stdout: "foo"
142-
permissions: 493
142+
permissions: 511
143143
}
144144
filename: "output/dns-records.zone"
145145
permissions: 438

0 commit comments

Comments
 (0)