Skip to content

Commit

Permalink
do something sensible if invoked without params in a CWD that isn't r…
Browse files Browse the repository at this point in the history
…el_notes
  • Loading branch information
josh-heyer authored and djw-m committed Nov 14, 2024
1 parent a8660ff commit f8a7a8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/automation/generators/relgen/relgen.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ let argv = yargs(hideBin(process.argv))
.option("p", {
alias: "path",
describe:
"The path to the relnotes directory (when set -o and -f are relative to this)",
"The path to the relnotes directory (should contain a src directory - see schema-readme.md)",
type: "string",
demandOption: true,
default: ".",
})
.check((argv) => {
const metapath = path.resolve(path.join(argv.path, "src", "meta.yml"));
if (!existsSync(metapath)) throw new Error("Can't find " + metapath);
return true;
})
.parse();

function converter(markdown) {
Expand Down

0 comments on commit f8a7a8c

Please sign in to comment.