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

regal fix segfaults on missing .regal dir #1341

Closed
grosser opened this issue Jan 16, 2025 · 1 comment · Fixed by #1343
Closed

regal fix segfaults on missing .regal dir #1341

grosser opened this issue Jan 16, 2025 · 1 comment · Fixed by #1343

Comments

@grosser
Copy link

grosser commented Jan 16, 2025

regal fix emptyfile.rego
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102bca9b0]

goroutine 1 [running]:
os.(*File).Name(...)
	/home/runner/go/pkg/mod/golang.org/[email protected]/src/os/file.go:62
github.com/styrainc/regal/cmd.fix({0x14000a17970, 0x1, 0x1}, 0x14000cad680)
	/home/runner/work/regal/regal/cmd/fix.go:273 +0xbc0
github.com/styrainc/regal/cmd.init.2.func3({0x14000a17970?, 0x102bdb11e?, 0x0?})
	/home/runner/work/regal/regal/cmd/fix.go:98 +0x24

here

	versionsMap, err := config.AllRegoVersions(regalDir.Name(), &userConfig)

charlieegan3 added a commit to charlieegan3/regal that referenced this issue Jan 16, 2025
charlieegan3 added a commit to charlieegan3/regal that referenced this issue Jan 16, 2025
@charlieegan3
Copy link
Member

#1343 should be the fix here.

charlieegan3 added a commit to charlieegan3/regal that referenced this issue Jan 16, 2025
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.

2 participants