File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,7 +217,8 @@ impl WasiCtxBuilder {
217217 /// This will use [`envs`](WasiCtxBuilder::envs) to append all host-defined
218218 /// environment variables.
219219 pub fn inherit_env ( & mut self ) -> & mut Self {
220- self . envs ( & std:: env:: vars ( ) . collect :: < Vec < ( String , String ) > > ( ) )
220+ self . cli . environment . extend ( std:: env:: vars ( ) ) ;
221+ self
221222 }
222223
223224 /// Appends a list of arguments to the argument array to pass to wasm.
@@ -237,7 +238,8 @@ impl WasiCtxBuilder {
237238 /// Appends all host process arguments to the list of arguments to get
238239 /// passed to wasm.
239240 pub fn inherit_args ( & mut self ) -> & mut Self {
240- self . args ( & std:: env:: args ( ) . collect :: < Vec < String > > ( ) )
241+ self . cli . arguments . extend ( std:: env:: args ( ) ) ;
242+ self
241243 }
242244
243245 /// Configures a "preopened directory" to be available to WebAssembly.
You can’t perform that action at this time.
0 commit comments