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
order of parameters get mixed up #191
Comments
Interesting. Any chance you can try and pinpoint where this is happening in code, or perhaps make a PR? This will be in https://github.com/mateodelnorte/meta-git. |
I have looked around a little bit and the issue does not seem to be in https://github.com/mateodelnorte/meta-git (it already receives the argv in a scrambled order) it happens in commander in {
(...)
rawArgs:
[ '/usr/local/Cellar/node/12.3.1/bin/node',
'/Users/thomaspinna/Documents/repositories/meta/bin/meta',
'git',
'push',
'--set-upstream',
'origin',
'images_in_app' ],
args: [ 'git', 'push', 'images_in_app' ],
runningCommand:
ChildProcess {
(...)
spawnargs:
[ 'meta-git', 'push', 'images_in_app', '--set-upstream', 'origin' ],
(...) } } you might notice that the There is an open issue on commander.js that might be related |
Interesting. Looks like the issue is in Commander. Perhaps I can update our
fork form master and see what fixes we get.
Otherwise, this might support others' idea to move away from Commander.
…On Thu, Sep 26, 2019 at 9:44 AM Thomas Pinna ***@***.***> wrote:
I have looked around a little bit and the issue does not seem to be in
https://github.com/mateodelnorte/meta-git (it already receives the argv
in a scrambled order)
it happens in commander in index.js of this repository. I'm not sure I
can tell you how to fix it (you have a fork of commander with some changes,
it seems), but if you console.log(program) in the end of the run(cwd,
argv) function, you can see the following:
{
...
rawArgs:
[ '/usr/local/Cellar/node/12.3.1/bin/node',
'/Users/thomaspinna/Documents/repositories/meta/bin/meta',
'git',
'push',
'--set-upstream',
'origin',
'images_in_app' ],
args: [ 'git', 'push', 'images_in_app' ],
runningCommand:
ChildProcess {
_events:
[Object: null prototype] { close: [Function: bound exit], error: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
_closesNeeded: 1,
_closesGot: 0,
connected: false,
signalCode: null,
exitCode: null,
killed: false,
spawnfile: 'meta-git',
_handle: Process { onexit: [Function], [Symbol(owner)]: [Circular] },
spawnargs:
[ 'meta-git', 'push', 'images_in_app', '--set-upstream', 'origin' ],
pid: undefined,
stdin: null,
stdout: null,
stderr: null,
stdio: [ null, null, null ] } }
you might notice that the rawArgs are still correct, but the spawnargs of
the childprocess are already wrong.
There is an open issue on commander.js
<tj/commander.js#508> that might be related
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#191?email_source=notifications&email_token=AAEHOX4ROELSEJXXA5NETCLQLTDDLA5CNFSM4I2MNL2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7V2MHQ#issuecomment-535537182>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEHOXYOEKVA5PYENR6U6Z3QLTDDLANCNFSM4I2MNL2A>
.
|
as a workaround, fyi, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🐛 Bug Report
With longer meta git commands, the order of parameters might get mixed up, resulting in errors.
To Reproduce
Run a command like
meta git push --set-upstream origin images_in_app
It will for each repository try and run
git push images_in_app --set-upstream origin
(resulting in an error)Expected behavior
It should run the following command in each repository
git push --set-upstream origin images_in_app
Temporary workaround for people with a similar issue
meta git push "--set-upstream origin images_in_app"
--> but this seems a bit annoying imho
The text was updated successfully, but these errors were encountered: