Commit Graph

3 Commits

Author SHA1 Message Date
Fraser Waters 3560333ae6
Clean up uses of .Error() ()
Combination of a few cleanups.

1. Don't call .Error() on errors that are being passed to "%s" format
functions. Format will call `Error()` itself.
2. Don't call assert.Error then assert.Equal/Contains, just use
assert.ErrorEqual/ErrorContains instead.
3. Use "%w" if appropriate, instead of "%v"/"%s".
2023-12-20 15:54:06 +00:00
Fraser Waters 297c8fb826
workspace/InstallPluginError: Use PluginSpec
Instead of copying the N fields of PluginSpec over to
InstallPluginError, just pass in the PluginSpec
and let it figure out the message.
2023-05-12 11:05:11 -07:00
Fraser Waters 41ad00128a
pkg/providers: Extract plugin installation to pkg/workspace
This adds a new pkg/workspace package
and moves the logic to install a provider into a function
in this new package.

This renames that functionality and the accompanying error to
InstallPlugin, as we intend to reuse the same logic to download other
plugins.

This commit contains no behavioral changes.
2023-05-12 11:03:52 -07:00