Skip to content

Fix template lookup on Windows #112

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

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

smainz
Copy link
Contributor

@smainz smainz commented Nov 10, 2024

fixes #111

Do not use fs.Join(...) as argument to fs.Glob(..), as it fails on Wiindows.

fs.Glob() expects a pattern like fs.Match(). On Windows fs.Join("*", "*.sql") will produce "*\\*.sql" which is not what one wants ( "*/*.sql"). On Linux fs.Join("*", "*.sql") results in"*/*.sql" which is a vaild pattern.

…ndows

fs.Glob() expects a pattern like fs.Match(). On Windows fs.Join("*", "*.sql") will produce "*\\*.sql"
which is not what one wants ("*/*.sql")
@smainz
Copy link
Contributor Author

smainz commented Nov 11, 2024

I could enhance this to not use fs.Glob(), but to use fs.WalkDir() to collect all shared files, allowing for deeply nested shared files.
What do you think?

@jackc jackc merged commit 765b1f0 into jackc:master Nov 16, 2024
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.

Including templates fails on Windows
2 participants