mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Make the message when running a plugin exe directly clearer (#12806)
# Description This changes the message that shows up when running a plugin executable directly rather than as a plugin to direct the user to run `plugin add --help`, which should have enough information to figure out what's going on. The message previously just vaguely suggested that the user needs to run the plugin "from within Nushell", which is not really enough - it has to be added with `plugin add` to be used as a plugin. Also fix docs for `plugin add` to mention `plugin use` rather than `register` (oops)
This commit is contained in:
@ -260,7 +260,8 @@ pub fn serve_plugin(plugin: &impl Plugin, encoder: impl PluginEncoder + 'static)
|
||||
}
|
||||
} else {
|
||||
eprintln!(
|
||||
"{}: This plugin must be run from within Nushell.",
|
||||
"{}: This plugin must be run from within Nushell. See `plugin add --help` for details \
|
||||
on how to use plugins.",
|
||||
env::current_exe()
|
||||
.map(|path| path.display().to_string())
|
||||
.unwrap_or_else(|_| "plugin".into())
|
||||
|
Reference in New Issue
Block a user