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

Appearance settings

Commit b3b2279

Browse filesBrowse files
committed
Fix compose-changelog.js overwriting itself when called with no arguments
1 parent 8a0454d commit b3b2279
Copy full SHA for b3b2279

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

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

Copy file name to clipboardExpand all lines: arduino-ide-extension/scripts/compose-changelog.js
+6-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.