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() {
56
56
exit_with_status ( 1 , & tmp_file_path) ;
57
57
}
58
58
59
- println ! ( "Downloading input via aoc-cli..." ) ;
59
+ let mut cmd_args = vec ! [ ] ;
60
60
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 ! [
63
67
"--file" . into( ) ,
64
68
tmp_file_path. to_string_lossy( ) . to_string( ) ,
65
69
"--day" . into( ) ,
66
70
args. day. to_string( ) ,
67
- ] ;
71
+ "download" . into( ) ,
72
+ ] ) ;
68
73
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( " " ) ) ;
73
75
74
76
match Command :: new ( "aoc" ) . args ( cmd_args) . output ( ) {
75
77
Ok ( cmd_output) => {
You can’t perform that action at this time.
0 commit comments