File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,22 @@ fn main() {
5656 exit_with_status ( 1 , & tmp_file_path) ;
5757 }
5858
59- println ! ( "Downloading input via aoc-cli..." ) ;
59+ let mut cmd_args = vec ! [ ] ;
6060
61- let mut cmd_args = vec ! [
62- "download" . into( ) ,
61+ if let Some ( year) = args. year {
62+ cmd_args. push ( "--year" . into ( ) ) ;
63+ cmd_args. push ( year. to_string ( ) ) ;
64+ }
65+
66+ cmd_args. append ( & mut vec ! [
6367 "--file" . into( ) ,
6468 tmp_file_path. to_string_lossy( ) . to_string( ) ,
6569 "--day" . into( ) ,
6670 args. day. to_string( ) ,
67- ] ;
71+ "download" . into( ) ,
72+ ] ) ;
6873
69- if let Some ( year) = args. year {
70- cmd_args. push ( "--year" . into ( ) ) ;
71- cmd_args. push ( year. to_string ( ) ) ;
72- }
74+ println ! ( "Downloading input with >aoc {}" , cmd_args. join( " " ) ) ;
7375
7476 match Command :: new ( "aoc" ) . args ( cmd_args) . output ( ) {
7577 Ok ( cmd_output) => {
You can’t perform that action at this time.
0 commit comments