We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23ae7bb commit dc6fcaeCopy full SHA for dc6fcae
ci/date-check/src/main.rs
@@ -3,6 +3,7 @@ use std::{
3
convert::TryInto as _,
4
env, fmt, fs,
5
path::{Path, PathBuf},
6
+ process,
7
str::FromStr,
8
};
9
@@ -124,7 +125,12 @@ fn filter_dates(
124
125
}
126
127
fn main() {
- let root_dir = env::args().nth(1).unwrap_or(".".into());
128
+ let mut args = env::args();
129
+ if args.len() == 1 {
130
+ eprintln!("error: expected root Markdown directory as CLI argument");
131
+ process::exit(1);
132
+ }
133
+ let root_dir = args.nth(1).unwrap();
134
let root_dir_path = Path::new(&root_dir);
135
let glob_pat = format!("{}/**/*.md", root_dir);
136
let today_chrono = Utc::today();
0 commit comments