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

Panic using fmt on filesystem path that does not exist #599

Closed
relvacode opened this issue Mar 7, 2024 · 0 comments · Fixed by #600
Closed

Panic using fmt on filesystem path that does not exist #599

relvacode opened this issue Mar 7, 2024 · 0 comments · Fixed by #600

Comments

@relvacode
Copy link
Contributor

$ templ fmt "this path does not exist"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xefe7626]

goroutine 36 [running]:
github.com/a-h/templ/cmd/templ/processor.Process.func1.FindTemplates.1({0x7ff7b21e99a2, 0x18}, {0x0, 0x0}, {0x0?, 0x0?})
        /Users/jkingsbury/go/pkg/mod/github.com/a-h/templ@v0.2.598/cmd/templ/processor/processor.go:46 +0x26
path/filepath.Walk({0x7ff7b21e99a2, 0x18}, 0xc000216fb8)
        /Users/jkingsbury/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.darwin-amd64/src/path/filepath/path.go:558 +0x4a
github.com/a-h/templ/cmd/templ/processor.FindTemplates(...)
        /Users/jkingsbury/go/pkg/mod/github.com/a-h/templ@v0.2.598/cmd/templ/processor/processor.go:45
github.com/a-h/templ/cmd/templ/processor.Process.func1()
        /Users/jkingsbury/go/pkg/mod/github.com/a-h/templ@v0.2.598/cmd/templ/processor/processor.go:22 +0x7a
created by github.com/a-h/templ/cmd/templ/processor.Process in goroutine 35
        /Users/jkingsbury/go/pkg/mod/github.com/a-h/templ@v0.2.598/cmd/templ/processor/processor.go:20 +0xa7
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 a pull request may close this issue.

1 participant