Skip to content

fix(config): reject failed token reads from stdin - #79

Open
efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-stdin-read-errors
Open

efegokdemir wants to merge 1 commit into
Basekick-Labs:mainfrom
efegokdemir:efe/token-stdin-read-errors

Conversation

@efegokdemir

Copy link
Copy Markdown
Contributor

--token-stdin accepted partial input when reading the first line failed, which could save a truncated token during profile creation or update. Return non-EOF read errors before saving the config. Regression tests check that failed reads leave the file unchanged and that EOF without a newline and completed first lines remain valid.

Tested on macOS arm64 with Go 1.27.1: go test -race -count=1 ./..., go vet ./..., go build ./..., gofmt -l . and git diff --check passed. Regression tests reproduced the configuration changes before the fix. Linux CI and the GoReleaser snapshot have not been run locally.

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.

1 participant