Skip to content
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

Crashes on discovery and status #80

Open
OsirisTerje opened this issue Dec 8, 2017 · 2 comments
Open

Crashes on discovery and status #80

OsirisTerje opened this issue Dec 8, 2017 · 2 comments

Comments

@OsirisTerje
Copy link

Windows 8.1, admin cmd prompt
Installs just fine, no warnings nor errors
npm version 5.6.0
node version 8.9.2

Running : "gr tag discover . " to tag all repos under a given folder

image

Then trying to see if this is something odd here, I try "gr status", but get:

image

@walljm
Copy link

walljm commented Jan 19, 2018

me to:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

on Windows 10

[master ↓2 ↑2 +0 ~1 -0 !] C:\projects\nextgen\packaging> gr tag discover
[gr] 3/31 Scanning C:\Users\walljm\Application Data/* for .git directories (depth 2)C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\tag.js:157
        throw e;
        ^

Error: EPERM: operation not permitted, scandir 'C:\Users\walljm\Application Data'
    at Object.fs.readdirSync (fs.js:911:18)
    at Object.discover [as handle] (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\tag.js:141:22)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:244:11)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
[master ↓2 ↑2 +0 ~1 -0 !] C:\projects\nextgen\packaging> cd ..
C:\projects\nextgen> gr discover
[gr] 3/31 Scanning C:\Users\walljm\Application Data/* for .git directories (depth 2)C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\tag.js:157
        throw e;
        ^

Error: EPERM: operation not permitted, scandir 'C:\Users\walljm\Application Data'
    at Object.fs.readdirSync (fs.js:911:18)
    at Object.discover [as handle] (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\tag.js:141:22)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:244:11)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
C:\projects\nextgen> gr discover c:\projects\nextgen
[gr] 1240/1240 Scanning c:\projects\nextgen\webclient\src\assets\lib/* for .git directories (depth 5)
'nano' is not recognized as an internal or external command,
operable program or batch file.
child_process.js:634
    throw err;
    ^

Error: Command failed: nano C:\Users\walljm\AppData\Local\Temp/gr-repos-tmp.txt
    at checkExecSyncError (child_process.js:591:13)
    at execSync (child_process.js:631:13)
    at Object.discover [as handle] (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\tag.js:196:3)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:244:11)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
C:\projects\nextgen> gr status
C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\lib\command-requirements.js:8
    if (gitCommand.stderr.toString().replace(/(\r\n|\n|\r)/gm, '').trim()) {
                         ^

TypeError: Cannot read property 'toString' of null
    at Object.git (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\lib\command-requirements.js:8:26)
    at Object.module.exports [as handle] (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\plugins\status.js:27:28)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:244:11)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
    at next (C:\Users\walljm\AppData\Roaming\npm\node_modules\git-run\index.js:227:14)
C:\projects\nextgen>

@jamiebarrow
Copy link

jamiebarrow commented Apr 23, 2018

It comes from this line of code basically, which tries to decide which editor to use to allow you to edit the file it generates for the .grconfig.json setup, and if no environment variables are set, it defaults to the nano editor (which isn't available on Windows especially):

var editor = process.env['GIT_EDITOR'] || process.env['EDITOR'] || 'nano'

Set your EDITOR environment variable to whatever your editor of choice is (e.g. code, or notepad++, or even notepad), then try again.

You could also probably manually edit the ~/.grconfig.json file yourself probably and then use gr as normal, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants