From 1c398a73b426dc2c84a777dda29a01b7e957435e Mon Sep 17 00:00:00 2001 From: Wilken Rivera Date: Fri, 4 Mar 2022 04:50:26 -0500 Subject: [PATCH] Set default file extension for binary removal on Windows (#11627) Related to #11625 --- command/plugins_remove.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/plugins_remove.go b/command/plugins_remove.go index d42e92a5ee8..a0258ee522f 100644 --- a/command/plugins_remove.go +++ b/command/plugins_remove.go @@ -58,6 +58,10 @@ func (c *PluginsRemoveCommand) RunContext(buildCtx context.Context, args []strin }, } + if runtime.GOOS == "windows" && opts.Ext == "" { + opts.BinaryInstallationOptions.Ext = ".exe" + } + plugin, diags := addrs.ParsePluginSourceString(args[0]) if diags.HasErrors() { c.Ui.Error(diags.Error())