diff options
| author | diogo464 <[email protected]> | 2025-07-11 18:35:02 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-07-11 18:35:02 +0100 |
| commit | f820d0240b9795f9d67c0c2e490924a15b0aa32e (patch) | |
| tree | 668da0a37d7589c6f70f9e9b32a43c76f1c502e6 /src | |
| parent | 9824c05540b11caf076115e4d383e912cb7fbcb0 (diff) | |
feat: create output directory if it doesn't exist in run command
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 58088ec..987f12f 100644 --- a/src/main.rs +++ b/src/main.rs | |||
| @@ -257,6 +257,14 @@ fn parse_schedule(schedule: &str) -> Result<Vec<ScheduledContainer>> { | |||
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | async fn cmd_run(args: RunArgs) -> Result<()> { | 259 | async fn cmd_run(args: RunArgs) -> Result<()> { |
| 260 | tracing::debug!( | ||
| 261 | "creating output directory if it does not exist at {}", | ||
| 262 | args.output_dir.display() | ||
| 263 | ); | ||
| 264 | tokio::fs::create_dir_all(&args.output_dir) | ||
| 265 | .await | ||
| 266 | .context("creating output directory")?; | ||
| 267 | |||
| 260 | let ctx = context_from_common(&args.common).await?; | 268 | let ctx = context_from_common(&args.common).await?; |
| 261 | let schedule = match args.schedule { | 269 | let schedule = match args.schedule { |
| 262 | Some(path) => { | 270 | Some(path) => { |
