File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,6 @@ fn add_stdlib(vm: &mut VirtualMachine) {
261
261
#[ allow( clippy:: needless_collect) ] // false positive
262
262
let path_list: Vec < _ > = state. settings . path_list . drain ( ..) . collect ( ) ;
263
263
264
- // add the current directory to sys.path
265
- state. settings . path_list . push ( "" . to_owned ( ) ) ;
266
-
267
264
// BUILDTIME_RUSTPYTHONPATH should be set when distributing
268
265
if let Some ( paths) = option_env ! ( "BUILDTIME_RUSTPYTHONPATH" ) {
269
266
state
Original file line number Diff line number Diff line change @@ -227,6 +227,9 @@ impl VirtualMachine {
227
227
panic ! ( "Double Initialize Error" ) ;
228
228
}
229
229
230
+ // add the current directory to sys.path
231
+ self . state_mut ( ) . settings . path_list . insert ( 0 , "" . to_owned ( ) ) ;
232
+
230
233
stdlib:: builtins:: make_module ( self , self . builtins . clone ( ) . into ( ) ) ;
231
234
stdlib:: sys:: init_module ( self , self . sys_module . as_ref ( ) , self . builtins . as_ref ( ) ) ;
232
235
You can’t perform that action at this time.
0 commit comments