Start Git Bash profile in Windows Terminal from bat file and pass in an executable command to run


I am trying to start 2 applications (client and server of a MERN stack app) in Git Bash using command-line arguments for Windows Terminal. Below given is my command

wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server cmd /k "npm run dev" ; split-pane -p "Git Bash" -H -d D:\ws\user-management\client cmd /k "npm run dev"

But this starts the application in windows cmd rather than in bash as I have given cmd /k. If I change the above command as wt -M; new-tab -p "Git Bash" -d D:\ws\user-management\server npm run dev, it throws this error

[error 0x80070002 when launching `npm run dev']

How do I run my npm run dev from git bash itself rather than cmd

asked on Super User Nov 4, 2020 by Johnson Cherian

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0