-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use 0666 file mode for writing configuration and lock files (#47)
Previously, files were written with the 0777 file mode. On most systems with 022 umask they would be written with the execution bits enabled, which is unnecessary for text files. ```console ❯ speakeasy quickstart ❯ ls -la OUTDIR/.speakeasy total 40 drwxr-xr-x@ 6 bflad staff 192 Jul 5 14:25 . drwxr-xr-x@ 17 bflad staff 544 Jul 5 14:32 .. -rwxr-xr-x@ 1 bflad staff 4801 Jul 5 14:25 gen.lock -rwxr-xr-x@ 1 bflad staff 584 Jul 5 14:25 gen.yaml -rw-r--r--@ 1 bflad staff 1062 Jul 5 14:25 workflow.lock -rw-r--r--@ 1 bflad staff 301 Jul 5 14:26 workflow.yaml ``` This change sets the file mode to 0666 and adds verification unit testing for the final saved file permissions. If the testing ever becomes platform dependently flakey, the umask can be explicitly set in the unit testing.
- Loading branch information
Showing
2 changed files
with
119 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters