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

Error while running script with args flag #176

Closed
srm09 opened this issue Sep 15, 2020 · 0 comments · Fixed by #177
Closed

Error while running script with args flag #176

srm09 opened this issue Sep 15, 2020 · 0 comments · Fixed by #177
Assignees
Labels
bug Something isn't working

Comments

@srm09
Copy link
Contributor

srm09 commented Sep 15, 2020

Setup info

The default args file ~/.crashd/args does not exist

When running the run command, crashd exits with an error

$ crashd run diagnsotics.crsh --args="a=b"
panic: assignment to entry in nil map

goroutine 1 [running]:
github.com/vmware-tanzu/crash-diagnostics/cmd.processScriptArguments(0xc0002149e0, 0x51, 0x0, 0xc000000000)
	/home/runner/work/crash-diagnostics/crash-diagnostics/cmd/run.go:76 +0x159
github.com/vmware-tanzu/crash-diagnostics/cmd.run(0xc0002149e0, 0x7ffeefbff5eb, 0x51, 0x0, 0x0)
	/home/runner/work/crash-diagnostics/crash-diagnostics/cmd/run.go:52 +0xc5
github.com/vmware-tanzu/crash-diagnostics/cmd.newRunCommand.func1(0xc000212f00, 0xc000214aa0, 0x1, 0x2, 0x0, 0x0)
	/home/runner/work/crash-diagnostics/crash-diagnostics/cmd/run.go:37 +0x4a
github.com/spf13/cobra.(*Command).execute(0xc000212f00, 0xc000214a60, 0x2, 0x2, 0xc000212f00, 0xc000214a60)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:826 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000212c80, 0x20b2e00, 0xc0000b0008, 0x27cbec0)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x30b
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:864
github.com/vmware-tanzu/crash-diagnostics/cmd.Run(0x1005f85, 0xc00009c058)
	/home/runner/work/crash-diagnostics/crash-diagnostics/cmd/crash-dianostics.go:65 +0x4f
main.main()
	/home/runner/work/crash-diagnostics/crash-diagnostics/main.go:14 +0x26

Expected behavior

When running the command without the presence of the default args file, the program should execute without any errors.

@srm09 srm09 self-assigned this Sep 15, 2020
@srm09 srm09 added the bug Something isn't working label Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant