question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Opening repository in command prompt results in catastrophic error

See original GitHub issue

Description

Unable to open repository in command prompt from the desktop app. Restarting the app results in the same error every time.

Version

1.0.12

GitHub Desktop version: 1.0.12

OS version: Windows 6.1.7601 (Windows 7 Ultimate SP1 64-bit)

Steps to Reproduce

github error_open in command prompt

Expected behavior: Opened in command prompt

Actual behavior: Error on the desktop app

Reproduces how often: 100%

Logs

Error: spawn where ENOENT at exports._errnoException (util.js:1050:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

Version: 1.0.12 OS: Windows 6.1.7601

Additional Information

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gilmaecommented, Jan 30, 2018

I’m seeing the same issue as the OP. Actually, I’ve seen it no matter what shell I opt for - Git Bash, Powershell, or Command Prompt.

Microsoft Windows [Version 10.0.16299.192] © 2017 Microsoft Corporation. All rights reserved.

C:\Users\username>where cmd ‘where’ is not recognized as an internal or external command, operable program or batch file.

C:\Users\username>echo %PATH% C:\OpenSSL-Win64\bin;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\username\AppData\Local\Microsoft\WindowsApps;C:\Users\username\AppData\Local\GitHubDesktop\bin

Manual check confirms, cmd.exe is in c:\Windows\System32

The exact error message received is

Error: spawn where ENOENT at exports._errnoException (util.js:1050:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32) at onErrorNT (internal/child_process.js:367:16) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

Version: 1.0.13 OS: Windows 10.0.16299

1reaction
shiftkeycommented, Jan 21, 2018

@laZaru5ap thanks for the report.

The code to launch cmd is rather straightforward:

const cp = spawn('START', ['cmd'], { shell: true, cwd: path })

My gut feeling is that your PATH value isn’t configured as expected.

Could you open a command prompt, run these two commands and attach the output here:

> echo %PATH%
> where cmd

This is what it looks like on one of my developer VMs:

Microsoft Windows [Version 10.0.16299.192]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\shiftkey>echo %PATH%
C:\Program Files (x86)\Parallels\Parallels Tools\Applications;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\; ...

C:\Users\shiftkey>where cmd
C:\Windows\System32\cmd.exe
Read more comments on GitHub >

github_iconTop Results From Across the Web

WMI: Repository Corruption, or Not? - Microsoft Community Hub
If WMI is corrupted, you can receive various errors and symptoms, ... From an elevated command prompt run "winmgmt /verifyrepository ".
Read more >
Recovering Deleted Files in GitHub - Rewind Backups
Learn how to recover deleted git files with the command line, the Github desktop app or web UI, or full backups and restores....
Read more >
11 Ways to Fix "The System Cannot Find The Path Specified ...
Run an SFC Scan​​ Then type cmd and press Enter. On the Command Prompt, type sfc /scannow and press Enter. If SFC finds...
Read more >
debugfs(8) - Linux manual page - man7.org
-c Specifies that the file system should be opened in catastrophic mode, in which the inode and group bitmaps are not read initially....
Read more >
Altium Designer is crashing when trying to Open any project
Getting this error: HRESULT: [0x88990012], Module: [SharpDX.Direct2D1], ApiCode: [D2DERR_WRONG_FACTORY / WrongFactory], Message: The objects ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found