@@ -14,14 +14,13 @@ use crate::config::Settings;
1414use crate :: errors:: Error ;
1515use crate :: errors:: Error :: ScriptFailed ;
1616use crate :: fake_asdf:: get_path_with_fake_asdf;
17- use crate :: file:: { basename , display_path} ;
17+ use crate :: file:: display_path;
1818use crate :: ui:: progress_report:: SingleReport ;
1919use crate :: { dirs, env} ;
2020
2121#[ derive( Debug , Clone ) ]
2222pub struct ScriptManager {
2323 pub plugin_path : PathBuf ,
24- pub plugin_name : String ,
2524 pub env : HashMap < OsString , OsString > ,
2625}
2726
@@ -104,11 +103,7 @@ impl ScriptManager {
104103 // used for testing failure cases
105104 env. insert ( "MISE_FAILURE" . into ( ) , failure) ;
106105 }
107- Self {
108- plugin_name : basename ( & plugin_path) . expect ( "invalid plugin path" ) ,
109- env,
110- plugin_path,
111- }
106+ Self { env, plugin_path }
112107 }
113108
114109 pub fn with_env < K , V > ( mut self , k : K , v : V ) -> Self
@@ -195,7 +190,6 @@ mod tests {
195190 let plugin_path = PathBuf :: from ( "/tmp/asdf" ) ;
196191 let script_manager = ScriptManager :: new ( plugin_path. clone ( ) ) ;
197192 assert_eq ! ( script_manager. plugin_path, plugin_path) ;
198- assert_eq ! ( script_manager. plugin_name, "asdf" ) ;
199193 }
200194
201195 #[ test]
0 commit comments