nsc add user -i is failing on `valid until` step - disregard issue - local to my system
sty-holdings opened this issue · 1 comments
Hello,
I was running this command on Mac and Linux, and it failed with an index out of range error. Here are the details:
Version: nsc version 2.7.6 (Linux and Mac)
scott_yacko_sty_holdings_com@nats-dev-1:~$ nsc add user -i
? select account SAVUP_OPEN
? user name savup_open_user
? generate an user nkey Yes
? valid 0
? valid until (0 is always) 0
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/nats-io/nsc/v2/cmd.(*SignerParams).SelectFromSigners(0x9884d28, {0x873678c, 0x9875dd0}, {0x0, 0x0, 0x0})
github.com/nats-io/nsc/v2/cmd/signerparams.go:84 +0xa56
github.com/nats-io/nsc/v2/cmd.(*AddUserParams).PreInteractive(0x9884d20, {0x873678c, 0x9875dd0})
github.com/nats-io/nsc/v2/cmd/adduser.go:174 +0x38a
github.com/nats-io/nsc/v2/cmd.run({0x873678c, 0x9875dd0}, {0x862ef80, 0x9884d20})
github.com/nats-io/nsc/v2/cmd/action.go:125 +0xa6
github.com/nats-io/nsc/v2/cmd.RunAction(0x9904000, {0x98f4a08, 0x0, 0x1}, {0x862ef80, 0x9884d20})
github.com/nats-io/nsc/v2/cmd/action.go:112 +0x79
github.com/nats-io/nsc/v2/cmd.CreateAddUserCmd.func1(0x9904000, {0x98f4a08, 0x0, 0x1})
github.com/nats-io/nsc/v2/cmd/adduser.go:72 +0x4a
github.com/spf13/cobra.(*Command).execute(0x9904000, {0x98f49f8, 0x1, 0x1})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x7e6
github.com/spf13/cobra.(*Command).ExecuteC(0x8a81bc0)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x412
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/nats-io/nsc/v2/cmd.ExecuteWithWriter({0x87336e4, 0x9812120})
github.com/nats-io/nsc/v2/cmd/root.go:219 +0x52
github.com/nats-io/nsc/v2/cmd.Execute()
github.com/nats-io/nsc/v2/cmd/root.go:207 +0x4b
main.main()
./main.go:34 +0xd9
Yes I was not able to reproduce.