Repository navigation
fix(config): don't warn about config permissions on Windows - #1077
Merged
Merged
Conversation
Topherhindman
force-pushed
the
fix/lk-windows-config-permissions
branch
from
October 23, 2026 17:11
4481a71 to
dfbcf1e
Compare
Topherhindman
force-pushed
the
auth-tests/lk-auth-scripts
branch
2 times, most recently
from
October 23, 2026 17:53
7d625e4 to
e07a424
Compare
Topherhindman
force-pushed
the
fix/lk-windows-config-permissions
branch
from
October 23, 2026 17:53
dfbcf1e to
2adcef4
Compare
Go reports mode 0666 for every writable file on Windows (0444 for a read-only one), so every lk command there warned that cli-config.yaml should be 0600, and chmod there can't change it. The check now runs only where file modes mean something; a script pins the warning off Windows and its absence on Windows. With the noise gone, TestScripts runs on Windows too: testscript sets the Windows home directory through USERPROFILE, so setupScript sets it as well as HOME, and the scripts are checked out with LF endings, as the TUI goldens are, since their expected output is compared byte for byte.
Topherhindman
force-pushed
the
fix/lk-windows-config-permissions
branch
from
October 23, 2026 19:39
2adcef4 to
7119dd6
Compare
u9g
approved these changes
Oct 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go reports mode 0666 for every writable file on Windows (0444 for a read-only one), so every lk command there warned that
cli-config.yamlshould be 0600. The warning couldn't be acted on either:chmodon Windows only sets the read-only bit. The check now runs only where file modes mean something, which is also how Helm treats its kubeconfig check. A new script,config-permissions-warning.txtar, pins the warning off Windows and its absence on Windows.With the noise gone,
TestScriptsruns on Windows too:USERPROFILE, sosetupScriptsets it as well asHOME;.gitattributeschecks the scripts out with LF endings, as it already does for the TUI goldens, since their expected output is compared byte for byte.Testing:
go test ./pkg/config ./cmd/lkand golangci-lint pass. The Windows workflow runsTestScriptsnatively: the scripts pass there, with the same known-bug skips as on other platforms.