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

Improve the missing plugin error to include the full name of the binary #5208

Merged
merged 7 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ CHANGELOG
=========

## HEAD (Unreleased)
_(none)

- Improved error message for missing plugins.
[#5208](https://github.com/pulumi/pulumi/pull/5208)

## 2.9.0 (2020-08-19)

Expand Down
4 changes: 2 additions & 2 deletions sdk/go/common/workspace/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ func NewMissingError(info PluginInfo) error {

func (err *MissingError) Error() string {
if err.Info.Version != nil {
return fmt.Sprintf("no %[1]s plugin '%[2]s-v%[3]s' found in the workspace or on your $PATH, "+
return fmt.Sprintf("no %[1]s plugin 'pulumi-%[1]s-%[2]s-v%[3]s' found in the workspace or on your $PATH, "+
komalali marked this conversation as resolved.
Show resolved Hide resolved
"install the plugin using `pulumi plugin install %[1]s %[2]s v%[3]s`",
err.Info.Kind, err.Info.Name, err.Info.Version)
}

return fmt.Sprintf("no %s plugin '%s' found in the workspace or on your $PATH",
return fmt.Sprintf("no %[1]s plugin 'pulumi-%[1]s-%[2]s' found in the workspace or on your $PATH",
komalali marked this conversation as resolved.
Show resolved Hide resolved
err.Info.Kind, err.Info.String())
}

Expand Down