mu sh npm i - not working - attempts to run git instead
benlester opened this issue · 5 comments
I run mu on two systems - my linux machine works fine, but my macbook does not.
ben@Benjamins-MacBook-Pro [16:28:01] [~/dev/sabstt/enterprise]
-> % mu --version
mu-repo version 1.8.1
When I run a custom sh command it looks like mu is trying to run it via git instead:
ben@Benjamins-MacBook-Pro [16:32:00] [~/dev/sabstt/enterprise]
-> % mu sh npm i
admin-api : git i
So obviously this fails... the strange thing is this works fine on my aforementioned linux box:
enterprise|⇒ mu sh npm i
admin-api : npm i
That too is running 1.8.1.
What does ‘mu sh which npm’ say on your Mac?
ben@Benjamins-MacBook-Pro [09:52:45] [~/dev/sabstt/enterprise]
-> % mu sh which npm
admin-api : git npm
/Users/ben/.nvm/versions/node/v16.14.2/bin/npm
Seems correct?
@benlester can you still reproduce this?
As a note, I don't really have a Mac to check... are you interested in debugging it?
The code should be straightforward if you're interested in doing some debugging... The related are is: https://github.com/fabioz/mu-repo/blob/master/mu_repo/__init__.py#L328
james@MacMini github.com % mu sh bash --version
browserosaurus : git --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
mu-repo : git --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
So the output is incorrect (says git
) but the command executes correctly for me.
@benlester Does the npm
command you're invoking work if you cd
into one of the subdirectories?
Apologies for the very late reply.
I uninstalled mu-repo via pip uninstall mu-repo
and reinstalled with pip install mu-repo
and it appears to be working now. Very strange.