File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,15 @@ use which::which;
1010// --------------------------------------------------
1111pub fn process ( args : & TicketArgs ) -> Result < ( ) > {
1212 debug ! ( "{args:?}" ) ;
13- dotenv:: dotenv ( ) ?;
14- let script_dir = & args
15- . script_dir
16- . clone ( )
17- . unwrap_or ( PathBuf :: from ( env:: var ( "SCRIPT_DIR" ) ?) ) ;
13+ let _ = dotenv:: dotenv ( ) ;
14+ let script_dir = & args. script_dir . clone ( ) . unwrap_or ( PathBuf :: from (
15+ env:: var ( "SCRIPT_DIR" ) . map_err ( |e| anyhow ! ( "SCRIPT_DIR: {e}" ) ) ?,
16+ ) ) ;
17+
18+ let landing_dir = & args. script_dir . clone ( ) . unwrap_or ( PathBuf :: from (
19+ env:: var ( "LANDING_DIR" ) . map_err ( |e| anyhow ! ( "LANDING_DIR: {e}" ) ) ?,
20+ ) ) ;
1821
19- let landing_dir = & args
20- . landing_dir
21- . clone ( )
22- . unwrap_or ( PathBuf :: from ( env:: var ( "LANDING_DIR" ) ?) ) ;
2322 let landing_dir = & landing_dir. join ( args. server . to_string ( ) ) ;
2423 if !landing_dir. is_dir ( ) {
2524 fs:: create_dir_all ( landing_dir) ?;
You can’t perform that action at this time.
0 commit comments