-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: explicitly run cli with node to fix tests on windows #53
Conversation
Changes Unknown when pulling 725ba1f on Tapppi:50-fix-win-tests into * on conventional-changelog:master*. |
@@ -14,6 +14,10 @@ function commit (msg) { | |||
shell.exec('git commit --allow-empty -m"' + msg + '"') | |||
} | |||
|
|||
function execCli (argString) { | |||
return shell.exec('node ' + cliPath + ' ' + argString) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should change this to:
return shell.exec('node ' + cliPath + (argString ? ' ' + argString : ''))
To avoid command strings like node /Users/nexdrew/git/qi/standard-version/index.js undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! To allow falsy values without allowing undefined or null I changed it to:
return shell.exec('node ' + cliPath + (argString != null ? ' ' + argString : ''))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's actually not necessary :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As Steve said, I don't think we need to worry about allowing falsy values here, but this should be fine.
New |
Explicitly run the cli with 'node <index.js path>' to fix running tests on windows. Fixes conventional-changelog#50
Rebased after #55 was merged, new test updated to use execCli as well. Should be fine for a merge. |
Awesome, thanks! |
Explicitly run the cli with 'node <index.js path>' to fix running tests on windows.
There seems to be a bug overwriting project package.json and CHANGELOG.md
on windows after failed tests.
Fixes #50