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

runtime error in run with some missing values for params or help #187

Closed
czhujer opened this issue May 12, 2023 · 1 comment
Closed

runtime error in run with some missing values for params or help #187

czhujer opened this issue May 12, 2023 · 1 comment

Comments

@czhujer
Copy link
Contributor

czhujer commented May 12, 2023

Hi,

I tried compile latest version on this plugin (because v0.10.3 has several critical CVEs) and I see some strange behavior.
Also I tested previous MR (175)

Behavior is same on our Gitlab CI runner (VM with ubuntu) or on my Macbook M2 (tested localy or over docker desktop).

first example:

$ ./bin/linux/amd64/helm-cm-push --help
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x270 pc=0x14ca666]

goroutine 1 [running]:
github.com/spf13/cobra.(*Command).ExecuteC(0xc000136010?)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:982 +0x26
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
main.main()
	/home/devopsuser/helm-push/cmd/helm-cm-push/main.go:460 +0x53

second example:

bash-5.1$ ./bin/linux/amd64/helm-cm-push -v
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x270 pc=0x14ca666]

goroutine 1 [running]:
github.com/spf13/cobra.(*Command).ExecuteC(0xc000136010?)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:982 +0x26
github.com/spf13/cobra.(*Command).Execute(...)
	/root/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
main.main()
	/home/devopsuser/helm-push/cmd/helm-cm-push/main.go:460 +0x53

I tried compile it with golang 1.20 and latest cobra version, but behavior is same.

Do you have any idea where can be issue?

Thanks
Patrik

scbizu added a commit that referenced this issue May 27, 2023
Signed-off-by: scbizu <scbizu@gmail.com>
scbizu added a commit that referenced this issue May 30, 2023
Signed-off-by: scbizu <scbizu@gmail.com>
jdolitsky pushed a commit that referenced this issue May 30, 2023
Signed-off-by: scbizu <scbizu@gmail.com>
@czhujer
Copy link
Contributor Author

czhujer commented May 31, 2023

looks like it's solved. thanks :)

@czhujer czhujer closed this as completed May 31, 2023
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