-
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
Fails on windows: error: unknown switch `m' #49
Comments
@Tapppi great catch :) would be more than happy to split this into two commands so that it works in your Windows environment. Would you like to try patching and testing? will definitely accept the commit. |
I'll take it on shortly, great distraction from writing specs. 😂 |
I completed work on this, but seems like the tests are broken as well on windows. Windows throws happy little "Microsoft JScript compilation error" dialogs on each test. I am currently debugging this problem, but lines like |
…cution Windows cmd doesn't support separating commands with ';'. Fix by separating the execution of the 'git add' and 'git commit' commands. Fixes conventional-changelog#49
…cution Windows cmd doesn't support separating commands with ';'. Fix by separating the execution of the 'git add' and 'git commit' commands. Added separate test for git add. Fixes conventional-changelog#49
Windows cmd doesn't support separating commands with ';'. Fix by separating the execution of the 'git add' and 'git commit' commands. Added separate test for git add. Fixes conventional-changelog#49
Windows cmd doesn't support separating commands with ';'. Fix by separating the execution of the 'git add' and 'git commit' commands. Added separate test for git add. Fixes #49
Has this not been release yet? Still seeing this on Windows.. |
@patrickmichalina Whoops, you're right, we did not publish a new release since #55 was merged. I will fix this shortly and let you know. |
@patrickmichalina Published 2.3.1 as |
|
Thanks, was able to get latest, but I guess this is a different issue...
Still cannot try out this package. Fails after it committing the changelog.md |
@patrickmichalina could you please open a new issue with at least the debug log and how you are running the command as this "works for me"(tm). That way I can better attempt to help you. |
When I run on windows (cygwin shell, cmd and a few types of other shells), the release fails due to an unknown switch being passed to git add.
After a short skimp through the source, I suspect the problem lies in the fact that both git add and git commit are executed at the same time and the ';' separator does not work in the windows cmd, thus the git commit -m flag being passed to add. In true windows style the exec calls cmd regardless of whether I execute standard-release in bash or cmd.. Output and debug log below.
My current workaround is to just add and commit myself.
Output
$ npm run release
√ bumping version in package.json from 1.0.0 to 1.1.0
√ outputting changes to CHANGELOG.md
√ committing package.json and CHANGELOG.md
error: unknown switch `m'
usage: git add [options] [--] ...
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\Tapppi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "release"
npm ERR! node v4.4.3
npm ERR! npm v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! @1.0.0 release:
standard-version
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @1.0.0 release script 'standard-version'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! standard-version
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! \npm-debug.log
debug-log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files (x86)\nodejs\node.exe',
1 verbose cli 'C:\Users\Tapppi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'release' ]
2 info using npm@3.9.5
3 info using node@v4.4.3
4 verbose run-script [ 'prerelease', 'release', 'postrelease' ]
5 info lifecycle @1.1.0
prerelease: @1.1.0prerelease: no script for prerelease, continuing6 silly lifecycle @1.1.0
7 info lifecycle @1.1.0
release: @1.1.0release: unsafe-perm in lifecycle true8 verbose lifecycle @1.1.0
9 verbose lifecycle @1.1.0
release: PATH:release: CWD: C:\dev10 verbose lifecycle @1.1.0
11 silly lifecycle @1.1.0
release: Args: [ '/d /s /c', 'standard-version' ]release: Returned: code: 1 signal: null12 silly lifecycle @1.1.0
13 info lifecycle @1.1.0~release: Failed to exec release script
14 verbose stack Error: @1.1.0 release:
standard-version
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Users\Tapppi\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:245:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess. (C:\Users\Tapppi\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:827:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid @1.1.0
16 verbose cwd C:\dev
17 error Windows_NT 6.1.7601
18 error argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Users\Tapppi\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "release"
19 error node v4.4.3
20 error npm v3.9.5
21 error code ELIFECYCLE
22 error @1.1.0 release:
standard-version
22 error Exit status 1
23 error Failed at the @1.1.0 release script 'standard-version'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error standard-version
23 error You can get information on how to open an issue for this project with:
23 error npm bugs
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Sorry about the silly redactions, just playing on the safe side with company stuff :)
The text was updated successfully, but these errors were encountered: