diff --git a/crates/nu-cmd-plugin/src/commands/plugin/add.rs b/crates/nu-cmd-plugin/src/commands/plugin/add.rs index fa0b599de3..c12f486668 100644 --- a/crates/nu-cmd-plugin/src/commands/plugin/add.rs +++ b/crates/nu-cmd-plugin/src/commands/plugin/add.rs @@ -1,10 +1,9 @@ +use crate::util::{get_plugin_dirs, modify_plugin_file}; use nu_engine::command_prelude::*; use nu_plugin_engine::{GetPlugin, PersistentPlugin}; use nu_protocol::{PluginGcConfig, PluginIdentity, PluginRegistryItem, RegisteredPlugin}; use std::sync::Arc; -use crate::util::{get_plugin_dirs, modify_plugin_file}; - #[derive(Clone)] pub struct PluginAdd; @@ -31,7 +30,7 @@ impl Command for PluginAdd { ) .required( "filename", - SyntaxShape::Filepath, + SyntaxShape::String, "Path to the executable for the plugin", ) .category(Category::Plugin) @@ -81,7 +80,6 @@ apparent the next time `nu` is next launched with that plugin registry file. ) -> Result { let filename: Spanned = call.req(engine_state, stack, 0)?; let shell: Option> = call.get_flag(engine_state, stack, "shell")?; - let cwd = engine_state.cwd(Some(stack))?; // Check the current directory, or fall back to NU_PLUGIN_DIRS