Skip to content

Commit 0a65d14

Browse files
committed
chore: rename command to show and fix show-layout
Signed-off-by: Thorsten Hans <[email protected]>
1 parent cc5796f commit 0a65d14

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/commands/plugins.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub enum PluginCommands {
4141
Update,
4242

4343
/// Print information about a plugin.
44-
Inspect(Inspect),
44+
Show(Show),
4545
}
4646

4747
impl PluginCommands {
@@ -53,7 +53,7 @@ impl PluginCommands {
5353
PluginCommands::Uninstall(cmd) => cmd.run().await,
5454
PluginCommands::Upgrade(cmd) => cmd.run().await,
5555
PluginCommands::Update => update().await,
56-
PluginCommands::Inspect(cmd) => cmd.run().await,
56+
PluginCommands::Show(cmd) => cmd.run().await,
5757
}
5858
}
5959
}
@@ -421,12 +421,12 @@ impl Upgrade {
421421
}
422422

423423
#[derive(Parser, Debug)]
424-
pub struct Inspect {
424+
pub struct Show {
425425
/// Name of Spin plugin.
426426
pub name: String,
427427
}
428428

429-
impl Inspect {
429+
impl Show {
430430
pub async fn run(self) -> Result<()> {
431431
let manager = PluginManager::try_default()?;
432432
let manifest = manager
@@ -438,13 +438,13 @@ impl Inspect {
438438
.await?;
439439

440440
println!(
441-
"{}: {} (License: {})\n{}\n\n{}",
441+
"{}: {} (License: {})\n{}\n{}",
442442
manifest.name(),
443443
manifest.version(),
444444
manifest.license(),
445445
manifest
446446
.homepage_url()
447-
.map(|u| u.to_string())
447+
.map(|u| format!("{u}\n"))
448448
.unwrap_or_default(),
449449
manifest.description().unwrap_or("No description provided"),
450450
);

0 commit comments

Comments
 (0)