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

Panic on "hugo serve" #11090

Closed
tksm opened this issue Jun 13, 2023 · 2 comments · Fixed by #11092
Closed

Panic on "hugo serve" #11090

tksm opened this issue Jun 13, 2023 · 2 comments · Fixed by #11092
Assignees
Milestone

Comments

@tksm
Copy link

tksm commented Jun 13, 2023

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.113.0+extended darwin/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes (v0.113.0)

Description

Though I'm not sure if it's still supported, Hugo has an alias "serve" for "server".

$ hugo server --help | grep -A2 Aliases: 2>&1
Aliases:
  server, serve

But "hugo serve" has consistently failed with a panic since v0.113.0. It seems that the simplecobra does not support aliases.

Press Ctrl+C to stop
^Cpanic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/bep/simplecobra.checkArgs(0xc0004c6600, {0xc000134010?, 0x1, 0xc000692060?})
        github.com/bep/simplecobra@v0.3.1/simplecobra.go:236 +0x1f5
github.com/bep/simplecobra.(*Exec).Execute(0xc0000141e8, {0x102603d38?, 0xc000126018?}, {0xc000134010?, 0x100043528?, 0xc0001005e8?})
        github.com/bep/simplecobra@v0.3.1/simplecobra.go:159 +0x107
github.com/gohugoio/hugo/commands.Execute({0xc000134010, 0x1, 0x1})
        github.com/gohugoio/hugo/commands/commandeer.go:66 +0x312
main.main()
        github.com/gohugoio/hugo/main.go:25 +0x65
@bep bep removed the NeedsTriage label Jun 13, 2023
@bep bep self-assigned this Jun 13, 2023
@bep bep added this to the v0.114.0 milestone Jun 13, 2023
bep added a commit to bep/simplecobra that referenced this issue Jun 13, 2023
bep added a commit to bep/simplecobra that referenced this issue Jun 13, 2023
bep added a commit to bep/hugo that referenced this issue Jun 13, 2023
bep added a commit that referenced this issue Jun 13, 2023
@tksm
Copy link
Author

tksm commented Jun 13, 2023

Thank you for fixing it so quickly!

@github-actions
Copy link

github-actions bot commented Jul 5, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants