Instead of correct command:
snap list
I wrongly typed in command:
snap --list
and got the panic error:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x56004b452d95]
goroutine 1 [running]:
main.main.func1()
/build/snapd/parts/snapd-deb/build/cmd/snap/main.go:492 +0x95
panic(0x56004baf7840, 0x56004c171900)
/usr/lib/go-1.13/src/runtime/panic.go:679 +0x1b6
main.run(0xc000403db8, 0xe)
/build/snapd/parts/snapd-deb/build/cmd/snap/main.go:559 +0x375
main.main()
/build/snapd/parts/snapd-deb/build/cmd/snap/main.go:497 +0x371
This is probably defect. I expect to get incorrect switch error or similar.
snap version
snap 2.57.6
snapd 2.57.6
series 16
ubuntu 22.10
kernel 5.19.0-26-generic
Can someone else confirm this?