Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit 1809258

Browse files
committed
fix: regression with output_path arg
Signed-off-by: Ryan Brue <[email protected]>
1 parent e3a48ca commit 1809258

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Ryan Brue <[email protected]>"]
44
repository = "https://github.com/ryanabx/simple-ssg"
55
license = "MIT"
66
readme = "README.md"
7-
version = "4.0.0"
7+
version = "4.0.1"
88
edition = "2021"
99
description = "Plain and simple static site generator for Djot and Markdown light markup languages"
1010

src/main.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,16 @@ fn run_program(args: ConsoleArgs) -> anyhow::Result<()> {
6363
dir.display()
6464
));
6565
}
66-
(dir, env::current_dir()?.join("output"))
66+
(
67+
dir,
68+
args.output_path
69+
.unwrap_or(env::current_dir()?.join("output")),
70+
)
6771
} else if let Some(path) = args.file {
6872
if path.is_dir() {
6973
return Err(anyhow!("Path {} is a directory. Specify <DIRECTORY> without the -f positional argument if this was intended.", path.display()));
7074
}
71-
(path, env::current_dir()?)
75+
(path, args.output_path.unwrap_or(env::current_dir()?))
7276
} else {
7377
return Err(anyhow!(
7478
"Must specify either a directory <DIRECTORY> or a path with -f <PATH>"

0 commit comments

Comments
 (0)