1

I am having issue with my command line. Sometimes when I run some script my powershell/cmd keeps closing/crashing but I know that the program is running because when I open my task manager those program are in the background and it really executes and finish the command. I tried both with cmd/powershell and they both giving me the problem, also tried running on non-admin/admin.

Example, running: composer install will install list and install dependency, then after some time it will close the cmd/powershell. Also happens when running npm install -g gulpjs/gulp-cli it closed the cmd/powershell. But in the background it is running node and you can actually see that the npm bin folder populating the files for the gulp-cli

Also, this only happens when I use cmd/powershell, but it seems to be working if using mintty (bash that came from Git)

I don't really to how to troubleshoot this, any idea?

Regards,

5
  • Yes, this is odd. I've never seen a way for a console program to cause the console itself to exit (beyond intentionally killing the process), and definitely npm install shouldn't do that. If you look in task manager is the cmd.exe still there? When you say cmd/powershell I assume you mean it happens in both cmd.exe and powershell?
    – moltenform
    Jan 18, 2018 at 8:58
  • @jmnben yup its still in the processes. yup it happens on both cmd and powershell
    – arvil
    Jan 18, 2018 at 10:22
  • Ok, so I guess it's that cmd.exe or powershell.exe are still running, but they are being hidden. I wonder if this isn't anything composer or npm are doing, but that some other process is hiding the console window.
    – moltenform
    Jan 18, 2018 at 19:42
  • How are you running the scripts? If you just double-click on them from the Windows GUI, the cmd/ps interface will close as soon as there are no more commands to execute. Jan 18, 2018 at 21:26
  • me to, running PowerShell from WebStorm - and the shell disappears but keeps running Mar 22, 2022 at 12:45

0

You must log in to answer this question.

Browse other questions tagged .