Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(expand_template): correct output permissions #516

Merged
merged 1 commit into from Sep 6, 2023

Conversation

alexeagle
Copy link
Member

@alexeagle alexeagle commented Sep 6, 2023

We used hexadecimal where we meant to use octal.
0x666 in binary is 11001100110 but 0666 is 110110110 (9 digits as expected)
so this was producing an output like
---xr--r-- 1 108 114 206 Sep 6 20:55 bazel-out/k8-opt/bin/stamped_labels.txt

we could fix both to explicit octal notation 0o666 and 0o777 but that's not what any of the "How to set permissions in Go" examples do.

An optional prefix sets a non-decimal base: 0b or 0B for binary, 0, 0o, or 0O for octal, and 0x or 0X for hexadecimal.


Type of change

  • Bug fix (change which fixes an issue)

Test plan

None, just visual inspection and reasoning

We used hexadecimal where we meant to use octal.
0x666 in binary is 11001100110 but 0666 is 110110110 (9 digits as
expected)
so this was producing an output like
---xr--r-- 1 108 114 206 Sep  6 20:55 bazel-out/k8-opt/bin/stamped_labels.txt
@alexeagle alexeagle merged commit 8703eb9 into main Sep 6, 2023
50 checks passed
@alexeagle alexeagle deleted the expand_template_perms branch September 6, 2023 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants