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

Bug : Crash on report summary vs ok on report html (when file does not exists) #169

Open
LasneF opened this issue Nov 18, 2024 · 0 comments

Comments

@LasneF
Copy link
Contributor

LasneF commented Nov 18, 2024

test done on :
openapi-changes version: 0.0.69 | compiled: Tue, 22 Oct 2024 14:03:15 UTC

Given the command

openapi-changes summrary a.yml b.yml where b fors not exists it crashes with the following stack

starting work. (0s)panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x60 pc=0xa13257]

goroutine 18 [running]:
github.com/pterm/pterm.(*SpinnerPrinter).Fail(0xc00002e620?, {0xc000036750?, 0xc00008ff30?, 0x1?})
        /home/runner/go/pkg/mod/github.com/pterm/pterm@v0.12.79/spinner_printer.go:234 +0x17
github.com/pb33f/openapi-changes/cmd.GetSummaryCommand.func1.1(0xc0001f0000, 0xc0001f0070)
        /home/runner/work/openapi-changes/openapi-changes/cmd/summary.go:146 +0x775
created by github.com/pb33f/openapi-changes/cmd.GetSummaryCommand.func1 in goroutine 

IMPORTTANT

openapi-changes html-report a.yml b.yml where b fors not exists
it fails correctly with an message

ERROR Stopped: cannot read modified spec: open perforce.yml: The system cannot find the file specified.
DONE completed processing

ERROR open perforce.yml: The system cannot find the file specified.
Error: unable to process specifications

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

No branches or pull requests

1 participant