Skip to content

Commit f70c2b6

Browse files
Merge pull request #1043 from kate-goldenring/plugin-to-plugins
Change `spin plugin` command to `spin plugins` retaining singular as an alias
2 parents 1abf1c0 + 007e0e6 commit f70c2b6

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

crates/plugins/src/manifest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn inner_check_supported_version(
141141
eprintln!("Plugin is not compatible with this version of Spin (supported: {supported_on}, actual: {spin_version}). Check overridden ... continuing to install or execute plugin.");
142142
} else {
143143
return Err(anyhow!(
144-
"Plugin is not compatible with this version of Spin (supported: {supported_on}, actual: {spin_version}). Try running `spin plugin update && spin plugin upgrade --all` to install latest or override with `--override-compatibility-check`."
144+
"Plugin is not compatible with this version of Spin (supported: {supported_on}, actual: {spin_version}). Try running `spin plugins update && spin plugins upgrade --all` to install latest or override with `--override-compatibility-check`."
145145
));
146146
}
147147
}

src/bin/spin.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ enum SpinApp {
5353
Deploy(DeployCommand),
5454
Build(BuildCommand),
5555
Login(LoginCommand),
56-
#[clap(subcommand, alias = "plugins")]
57-
Plugin(PluginCommands),
56+
#[clap(subcommand, alias = "plugin")]
57+
Plugins(PluginCommands),
5858
#[clap(subcommand, hide = true)]
5959
Trigger(TriggerCommands),
6060
#[clap(external_subcommand)]
@@ -81,7 +81,7 @@ impl SpinApp {
8181
Self::Trigger(TriggerCommands::Http(cmd)) => cmd.run().await,
8282
Self::Trigger(TriggerCommands::Redis(cmd)) => cmd.run().await,
8383
Self::Login(cmd) => cmd.run().await,
84-
Self::Plugin(cmd) => cmd.run().await,
84+
Self::Plugins(cmd) => cmd.run().await,
8585
Self::External(cmd) => execute_external_subcommand(cmd, SpinApp::command()).await,
8686
}
8787
}

tests/integration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ route = "/..."
12011201
// Install plugin
12021202
let install_args = vec![
12031203
SPIN_BINARY,
1204-
"plugin",
1204+
"plugins",
12051205
"install",
12061206
"--file",
12071207
manifest_file_path.to_str().unwrap(),
@@ -1227,7 +1227,7 @@ route = "/..."
12271227
)?;
12281228
let upgrade_args = vec![
12291229
SPIN_BINARY,
1230-
"plugin",
1230+
"plugins",
12311231
"upgrade",
12321232
"example",
12331233
"--file",
@@ -1248,7 +1248,7 @@ route = "/..."
12481248
assert!(manifest.contains("0.2.1"));
12491249

12501250
// Uninstall plugin
1251-
let uninstall_args = vec![SPIN_BINARY, "plugin", "uninstall", "example"];
1251+
let uninstall_args = vec![SPIN_BINARY, "plugins", "uninstall", "example"];
12521252
run(uninstall_args, None, None)?;
12531253
Ok(())
12541254
}

tests/plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Example Plugin
22

33
This `example.sh` script acts as an example Spin plugin for testing Spin plugin functionality.
4-
It is referenced in the `spin plugin` [integration tests](../integration.rs)
4+
It is referenced in the `spin plugins` [integration tests](../integration.rs)
55

66
To recreate:
77

0 commit comments

Comments
 (0)