scaleway-cli icon indicating copy to clipboard operation
scaleway-cli copied to clipboard

user-data set with no argument crash

Open Codelax opened this issue 1 year ago • 0 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Command attempted

scw instance user-data set

Expected Behavior

Usage as it require arguments

Actual Behavior

stacktrace from panic: 
goroutine 1 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.17.13/x64/src/runtime/debug/stack.go:24 +0x65
main.cleanup(0xc0002c5030)
	/home/runner/work/scaleway-cli/scaleway-cli/cmd/scw/main.go:38 +0x85
panic({0x9fcba0, 0xc00036d450})
	/opt/hostedtoolcache/go/1.17.13/x64/src/runtime/panic.go:1038 +0x215
github.com/scaleway/scaleway-cli/v2/internal/core.loadArgsFileContent(0xc00036d400, {0x9cc740, 0xc0004f08c0})
	/home/runner/work/scaleway-cli/scaleway-cli/internal/core/arg_file_content.go:60 +0x778
github.com/scaleway/scaleway-cli/v2/internal/core.run({0xbeb740, 0xc0003b0300}, 0xc0002d5680, 0xc0002ec1c0, {0xc00036d400, 0x1, 0x1})
	/home/runner/work/scaleway-cli/scaleway-cli/internal/core/cobra_utils.go:119 +0x110
github.com/scaleway/scaleway-cli/v2/internal/core.cobraRun.func1(0xc000485180, {0x1016a28, 0x0, 0x0})
	/home/runner/work/scaleway-cli/scaleway-cli/internal/core/cobra_utils.go:47 +0x59d
github.com/spf13/cobra.(*Command).execute(0xc000485180, {0x1016a28, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x624
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001bac80)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:918
github.com/scaleway/scaleway-cli/v2/internal/core.Bootstrap(0xc000135ed0)
	/home/runner/work/scaleway-cli/scaleway-cli/internal/core/bootstrap.go:204 +0xdea
main.main()
	/home/runner/work/scaleway-cli/scaleway-cli/cmd/scw/main.go:59 +0x291

unsupported field type: <nil>

More info

Codelax avatar Sep 02 '22 15:09 Codelax