Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: Listing parameters when you have 0 panics, index out of bounds #491

Closed
@Emyrk

Description

@Emyrk

Summary

When you doparameters list with 0 parameters, you get a panic.

$ ./coder parameters listpanic: runtime error: index out of range [0] with length 0goroutine 1 [running]:github.com/coder/coder/cli.parameterList.func1(0xc000259b80, {0xecfa7f0, 0x0, 0x0})/home/runner/work/coder/coder/cli/parameterlist.go:28 +0x6e5github.com/spf13/cobra.(*Command).execute(0xc000259b80, {0xecfa7f0, 0x0, 0x0})/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x60egithub.com/spf13/cobra.(*Command).ExecuteC(0xc00013ea00)/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bcgithub.com/spf13/cobra.(*Command).Execute(...)/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902main.main()/home/runner/work/coder/coder/cmd/coder/main.go:10 +0x1esteven ~/Downloads/example $

Current Behavior (steps to reproduce)

A index out of bounds panic.

  1. Start a new dev server./coder start --dev
  2. List params./coder parameters list

Desired Behavior

Return an empty list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp