Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b3b2279

Browse files
Fix compose-changelog.js overwriting itself when called with no arguments
1 parent 8a0454d commit b3b2279

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎arduino-ide-extension/scripts/compose-changelog.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@
2727
return acc + `# ${item.name}\n\n${body}\n\n---\n\n`;
2828
}, '');
2929

30-
const changelogFile = path.resolve(process.argv[process.argv.length - 1]);
30+
const args = process.argv.slice(2)
31+
if (args.length == 0) {
32+
console.error("Missing argument to destination file")
33+
process.exit(1)
34+
}
35+
const changelogFile = path.resolve(args[0]);
3136

3237
await fs.writeFile(
3338
changelogFile,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /