File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,12 @@ impl Installer {
189189 . await
190190 . map_err ( |e| EnabledModulesError :: LinkIo ( path. clone ( ) , e) ) ?;
191191
192+ let manifest_path = if manifest_path. is_absolute ( ) {
193+ manifest_path
194+ } else {
195+ enabled_dir. join ( & manifest_path)
196+ } ;
197+
192198 let manifest = read_manifest ( & manifest_path)
193199 . await
194200 . map_err ( |e| EnabledModulesError :: ReadManifestError ( path, e) ) ?;
@@ -363,6 +369,16 @@ impl Installer {
363369 . await ?
364370 . ok_or ( EnableError :: NotInstalled ) ?;
365371
372+ let target_path = if target_path. starts_with ( & self . install_dir ( ) ) {
373+ // manifest is in installed directory: ../installed/manifest.json
374+ std:: path:: PathBuf :: from ( ".." )
375+ . join ( "installed" )
376+ . join ( target_path. file_name ( ) . unwrap ( ) )
377+ } else {
378+ // manifest is in legacy location: ../manifest.yaml
379+ std:: path:: PathBuf :: from ( ".." ) . join ( target_path. file_name ( ) . unwrap ( ) )
380+ } ;
381+
366382 let src_path = self . enable_dir ( ) . join ( module_name. as_ref ( ) ) ;
367383
368384 #[ cfg( unix) ]
You can’t perform that action at this time.
0 commit comments