@@ -141,10 +141,7 @@ impl WindServiceAdapter {
141141 pub async fn get_environment_service ( & self ) -> Result < WindEnvironmentService , String > {
142142 debug ! ( "[WindServiceAdapters] Getting Wind environment service" ) ;
143143
144- let environment: Arc < dyn Common :: Environment :: EnvironmentProvider :: EnvironmentProvider > =
145- self . runtime . Environment . Require ( ) ;
146-
147- Ok ( WindEnvironmentService :: new ( environment) )
144+ Ok ( WindEnvironmentService :: new ( ) )
148145 }
149146
150147 /// Get Wind-compatible file service
@@ -180,23 +177,21 @@ impl WindServiceAdapter {
180177
181178/// Wind environment service adapter
182179pub struct WindEnvironmentService {
183- provider : Arc < dyn Common :: Environment :: EnvironmentProvider :: EnvironmentProvider > ,
180+ // Environment variables are accessed via std::env
184181}
185182
186183impl WindEnvironmentService {
187- pub fn new ( provider : Arc < dyn Common :: Environment :: EnvironmentProvider :: EnvironmentProvider > ) -> Self {
188- Self { provider }
184+ pub fn new ( ) -> Self {
185+ Self { }
189186 }
190187
191188 pub async fn get_app_root ( & self ) -> Result < String , String > {
192- self . provider . GetEnvironmentVariable ( "APP_ROOT" . to_string ( ) )
193- . await
189+ std:: env:: var ( "APP_ROOT" )
194190 . map_err ( |e| e. to_string ( ) )
195191 }
196192
197193 pub async fn get_user_data_path ( & self ) -> Result < String , String > {
198- self . provider . GetEnvironmentVariable ( "USER_DATA_PATH" . to_string ( ) )
199- . await
194+ std:: env:: var ( "USER_DATA_PATH" )
200195 . map_err ( |e| e. to_string ( ) )
201196 }
202197}
0 commit comments