diff --git a/dist/index.js b/dist/index.js index 8b418eb..7160e9a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -40,7 +40,7 @@ class Changelog { lines.push(`${c.hash} ${c.message}`); }); const changelogDir = path.parse(this.settings.changelogFilePath).dir; - if (!fs.existsSync(changelogDir)) { + if (changelogDir && !fs.existsSync(changelogDir)) { fs.mkdirSync(changelogDir); } fs.writeFileSync(this.settings.changelogFilePath, lines.join('\n')); diff --git a/package.json b/package.json index 965f6f1..9ca22b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-changelog", - "version": "1.2.1", + "version": "1.2.2", "private": true, "description": "Action to generate a changelog from a Git repository commit history.", "main": "lib/main.js",