vizion icon indicating copy to clipboard operation
vizion copied to clipboard

vizion.analyze fails if no remote named 'origin' is specified

Open thewilli opened this issue 10 years ago • 3 comments
trafficstars

if running on a git repository without an origin remote specified, vizion runs into an error:

Error: Error: Command failed: /bin/sh -c cd '/path/to/repo/';LC_ALL=en_US.UTF-8 git config --get remote.origin.url

Vizion should not crash for repositories without any remote at all or with a remote named other than "origin".

thewilli avatar Nov 03 '15 22:11 thewilli

Hello,

Thanks for reporting this issue, does it crashed PM2 too??

Unitech avatar Nov 04 '15 11:11 Unitech

@Unitech no, but the pm2-managed app is considered as not being under source control, and no metadata of the git repository is available.

thewilli avatar Nov 04 '15 15:11 thewilli

So returning return cb(null, null); here https://github.com/keymetrics/vizion/blob/master/lib/git.js#L20

would do the trick right?

Unitech avatar Nov 05 '15 14:11 Unitech