File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,17 @@ fn set_env_vars() {
1010 . compare_exchange ( false , true , Ordering :: SeqCst , Ordering :: SeqCst )
1111 . is_ok ( )
1212 {
13- let current_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
14- let base_dir = if current_dir. ends_with ( "sh" ) {
15- current_dir. join ( "tests" )
13+ let mut current_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
14+ let read_dir;
15+ let write_dir;
16+ if current_dir. ends_with ( "sh" ) {
17+ read_dir = current_dir. join ( "tests/read_dir" ) ;
18+ current_dir. pop ( ) ;
19+ write_dir = current_dir. join ( "target/tmp/sh_test_write_dir" ) ;
1620 } else {
17- current_dir. join ( "sh/tests" )
21+ read_dir = current_dir. join ( "sh/tests/read_dir" ) ;
22+ write_dir = current_dir. join ( "target/tmp/sh_test_write_dir" )
1823 } ;
19- let read_dir = base_dir. join ( "read_dir" ) ;
20- let write_dir = base_dir. join ( "write_dir" ) ;
2124 if !write_dir. exists ( ) {
2225 std:: fs:: create_dir ( & write_dir) . expect ( "failed to create write_dir" ) ;
2326 }
You can’t perform that action at this time.
0 commit comments