Skip to content

cmd/go: missing name of failed command in error #61604

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

Closed
rsc opened this issue Jul 27, 2023 · 4 comments
Closed

cmd/go: missing name of failed command in error #61604

rsc opened this issue Jul 27, 2023 · 4 comments
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jul 27, 2023

Looks like I broke an error path when I refactored this code to enable toolchain updates:

% go1.20 asdf
go asdf: unknown command
Run 'go help' for usage.
% go asdf
go : unknown command
Run 'go help' for usage.
% 

Note the missing asdf in the second error message.

@rsc rsc added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Jul 27, 2023
@rsc rsc added this to the Go1.21 milestone Jul 27, 2023
mauri870 added a commit to mauri870/go that referenced this issue Jul 27, 2023
Fixed the error reporting for an unknown command to
preserve the command when displaying the error message.

e.g:
	go asdf: unknown command

instead of:
	go : unknown command

Fixes: golang#61604
mauri870 added a commit to mauri870/go that referenced this issue Jul 27, 2023
Fixed the error reporting for an unknown command to
preserve the name when displaying the error message.

go : unknown command
go asdf: unknown command

Fixes: golang#61604
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/513555 mentions this issue: cmd/go: missing name in failed command error

@dmitshur dmitshur added the GoCommand cmd/go label Jul 28, 2023
@dmitshur
Copy link
Contributor

dmitshur commented Aug 2, 2023

Reopening to track CL submission to release-branch.go1.21.

@dmitshur dmitshur reopened this Aug 2, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/515278 mentions this issue: [release-branch.go1.21] cmd/go: missing name in failed command error

gopherbot pushed a commit that referenced this issue Aug 2, 2023
Fixed the error reporting for an unknown command to
preserve the name when displaying the error message.

Fixes #61604

Change-Id: I13defb84e61265ab48ab514e9d4f1626a4a3f758
GitHub-Last-Rev: 5d2889c
GitHub-Pull-Request: #61607
Reviewed-on: https://go-review.googlesource.com/c/go/+/513555
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/515278
Auto-Submit: David Chase <drchase@google.com>
@dmitshur
Copy link
Contributor

dmitshur commented Aug 2, 2023

Closed by merging CL 515278 (commit 07c72a0) to release-branch.go1.21.

@dmitshur dmitshur closed this as completed Aug 2, 2023
@golang golang locked and limited conversation to collaborators Aug 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants