fix: preserve directory scan boundaries - #32
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91ed6d7430
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if _, known := sshconfig.LookupKeyword(nodes[0].Directive.KeywordValue); known { | ||
| return true |
There was a problem hiding this comment.
Keep Include-only files out of legacy directory conversion
When a scanned directory contains an Include-only top-level config—the exact case added by this change—the keyword lookup now adds that file to GetPathContent, which concatenates it with the discovered fragments. The normal conversion path then rejects the resulting Include directive in validateLegacySSHConfig with “Include cannot be represented”; lossless mode also rejects directory sources. Consequently, a common config containing Include config.d/* now makes the entire directory conversion fail, whereas it was previously skipped and the recursively discovered fragment files were converted.
Useful? React with 👍 / 👎.
91ed6d7 to
f34ed0a
Compare
Summary
Verification
go test ./...go test -race ./...go vet ./...git diff --check