File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,12 @@ use zed_extension_api::{Command, Result};
44/// A simple wrapper around the `bundle` command.
55pub struct Bundler {
66 pub working_dir : String ,
7+ envs : Vec < ( String , String ) > ,
78}
89
910impl Bundler {
10- pub fn new ( working_dir : String ) -> Self {
11- Bundler { working_dir }
11+ pub fn new ( working_dir : String , envs : Vec < ( String , String ) > ) -> Self {
12+ Bundler { working_dir, envs }
1213 }
1314
1415 pub fn installed_gem_version ( & self , name : & str ) -> Result < String > {
@@ -26,6 +27,7 @@ impl Bundler {
2627 Command :: new ( "bundle" )
2728 . arg ( cmd)
2829 . args ( args)
30+ . envs ( self . envs . clone ( ) )
2931 . env ( "BUNDLE_GEMFILE" , bundle_gemfile)
3032 . output ( )
3133 . and_then ( |output| match output. status {
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ pub trait LanguageServer {
6767 return self . try_find_on_path_or_extension_gemset ( language_server_id, worktree) ;
6868 }
6969
70- let bundler = Bundler :: new ( worktree. root_path ( ) ) ;
70+ let bundler = Bundler :: new ( worktree. root_path ( ) , worktree . shell_env ( ) ) ;
7171 match bundler. installed_gem_version ( Self :: GEM_NAME ) {
7272 Ok ( _version) => {
7373 let bundle_path = worktree
You can’t perform that action at this time.
0 commit comments