-
Notifications
You must be signed in to change notification settings - Fork 12
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
Windows command runner #20
base: master
Are you sure you want to change the base?
Conversation
I think I would prefer something more like: var sh = '/bin/bash'
var flag = '-c'
if (process.platform === 'win32') {
sh = process.env.comspec || 'cmd'
flag = '/C'
}
var child = spawn(sh, [flag, fixedCmd.join(' ')], opts) The thing I would want to confirm is that this does not break for users using git-bash vs the windows command prompt... |
@evanlucas Good point, maybe if there |
Yea, I'd be fine with that |
will use travis to ensure they still pass online
I needed the tests working before I continue, will look at adding the options soon |
Using this fork my runner now works fine |
Hey @Arcath, I'm trying to get these PRs taken care of. Can you fix the conflicts and rebase off master? Also, you'll need to fix the command line shorthand options to not conflict with existing options, and be 1 character. |
Any update on this, guys? |
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.
Waiting for a rebase and resolution of conflicts.
@@ -36,6 +36,8 @@ gcr - a gitlab ci runner | |||
-s, --strictSSL enable/disable strict ssl | |||
-n, --npm run npm install/test if no commands are present | |||
-k, --keypath <path> specify path to rsa key | |||
-s, --shell <path> specify path to shell e.g. /bin/bash | |||
-sf, --shellFlag <flag> set the flag to run commands on your shell e.g. -c |
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.
Need single character only for -
flags.
@@ -84,7 +94,7 @@ test('build and run with clone', (t) => { | |||
t.ok(build.hasOwnProperty('opts'), 'hasOwnProperty(opts)') | |||
t.ok(build.hasOwnProperty('output'), 'hasOwnProperty(output)') | |||
t.ok(build.hasOwnProperty('projectDir'), 'hasOwnProperty(projectDir)') | |||
t.equal(build.projectDir, '/tmp/gcr-builds/project-1') | |||
t.equal(build.projectDir, path.join('/', 'tmp', 'gcr-builds', 'project-1')) |
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.
This fixes the tests having the path seperator /
hard coded. Windows can pass this no problem but its returned paths use \
Fixes #19 by using
cmd.exe /C
instead of/bin/bash -c
when the platform is win32Also ignore node_modules/ (my first git add went nuts with the whole node_modules folder)