@@ -3,6 +3,7 @@ use std::{
33 env, fmt,
44 fs:: { self , File } ,
55 io:: { BufReader , Seek , SeekFrom } ,
6+ iter,
67 path:: Path ,
78} ;
89
@@ -50,6 +51,7 @@ impl fmt::Display for PackageManagerType {
5051#[ derive( Debug ) ]
5152pub struct ResolveCommandResult {
5253 pub bin_path : String ,
54+ pub args : Vec < String > ,
5355 pub envs : HashMap < String , String > ,
5456}
5557
@@ -146,14 +148,6 @@ impl PackageManager {
146148 self . install_dir . join ( "bin" )
147149 }
148150
149- #[ must_use]
150- pub fn resolve_command ( & self ) -> ResolveCommandResult {
151- ResolveCommandResult {
152- bin_path : self . bin_name . to_string ( ) ,
153- envs : HashMap :: from ( [ ( "PATH" . to_string ( ) , format_path_env ( self . get_bin_prefix ( ) ) ) ] ) ,
154- }
155- }
156-
157151 #[ must_use]
158152 pub fn get_fingerprint_ignores ( & self ) -> Vec < Str > {
159153 let mut ignores: Vec < Str > = vec ! [
@@ -601,7 +595,7 @@ async fn set_package_manager_field(
601595 Ok ( ( ) )
602596}
603597
604- fn format_path_env ( bin_prefix : impl AsRef < Path > ) -> String {
598+ pub ( crate ) fn format_path_env ( bin_prefix : impl AsRef < Path > ) -> String {
605599 let mut paths = env:: split_paths ( & env:: var_os ( "PATH" ) . unwrap_or_default ( ) ) . collect :: < Vec < _ > > ( ) ;
606600 paths. insert ( 0 , bin_prefix. as_ref ( ) . to_path_buf ( ) ) ;
607601 env:: join_paths ( paths) . unwrap ( ) . to_string_lossy ( ) . to_string ( )
0 commit comments