Running git bash in background/as daemon - eclipse

I'm running my git bash using Eclipse Builders, which will trigger npm run scripts when my javascript is updated. Whenever I save a javascript, the git bash terminal appears for a short while before it's dismissed. Is there any arguments that will make the bash not open at all?

In order to achieve running a command without the popup appearing (and vbscript doesn't work in Eclipse builder for some weird reason), I created a .bat file and a task folder in my project instead.
Current setup:
.bat file content
start /MIN cmd /c "npm run transpile"
exit

Related

Can't run CD command inside a batchfile inside vscode

When I tried to run a batchfile (with a cd command) outside vscode, it is working, but if inside vscode its not. What options do I have in order to run a CD command inside a batchfile inside vscode, when I try to open my project in vscode, it has a lengthy path, so I need to automatically cd to the correct path automatically by using a batchfile? Why does vscode behave like this?

Npm command not recognized (ubuntu)

After installing java 8 openjdk and exporting the variable via export I ran the following command:
source /etc/enviorment
I after that when I try to run npm run tests-e2e, it says the command is not recognized.
Executing source /etc/environment has reset your shell's environment variables back to their default values, throwing away any customisations that were applied by your shell's startup scripts (/etc/profile, ~/.bash_profile and so on). In particular, it looks like you've lost the customised value of $PATH that carried the path to the directory where the npm command lives.
To recover, you can do any of:
execute exec bash -l to get a new shell that will execute the
startup scripts and therefore rebuild a properly customised $PATH variable
if you're using the GUI, close the terminal window and open a new one
log out and then log back in

Configure Eclipse to use bash login shell for Cygwin toolchain

I have a custom Makefile project in Eclipse and although the build does get run in a Cygwin shell... it does not seem to be a login shell (bash --login) as it doesn't set my environment variables like running cygwin.bat does.
Where in Eclipse can I change the shell command so that it will be a login shell?
What you actually aim with bash --login are your settings from /etc/profile.
Under UNIX you normally have only one login shell and so these settings are inherited by all other shells. Under Windows any Bash window is an isoloated login shell, which leads to missing environment settings when running Bash from tools that run bash simply as command processor.
I had a similar problem with Emacs compile feature. The best solution under Windows is to set the environment variable BASH_ENV to a script. Bash will execute this script when started without -i or --login, so that /etc/profile is not run. Hence the script will setup Bash for non-interactive, non-login shells.
Example:
BASH_ENV=%USERPROFILE%\.bash_env
as user environment variable. The least thing to do in this script is to set PATH as in /etc/profile:
PATH="/usr/local/bin:/usr/bin:${PATH}"
Check the path-settings in /etc/profile as it is created by Cygwin's setup.exe. You may also copy settings from ~/.bashrc or source this script.
Hope this helps.

How to get Powershell to run SH scripts

Can someone please tell me how I get Powershell to run .sh scripts? It keeps just trying to open the file i need in Notepad when I run this command:
.\update-version.sh 123
I've added .SH to my PATHEXT environment variable and also added the Microsoft.PowerShell_profile.ps1 directory to the Path environment variable.
PowerShell scripts have a .ps1 extension (along with other supported extensions such as psm1,psd1 etc) it will not run other extensions other than that.
I had also got the same issue when i am trying to run .sh files. The solution is you need to enable bash shell by typing bash.After enabling Bash on Windows, you can run .sh files by typing bash ./fileName.sh. But i have tried through git bash with typing . fileName.sh it worked well. These are the two solutions that I have found, and you can try whatever you wish.

To build a script from Eclipse to run commands in cmd

I am using a set of commands to build my project in a expanded mode to deploy it in weblogic so each time i need to go to cmd and change directory to my project directory and run the command 'client dev fullexpanded' .
I want to make a script to run these commands which i running through cmd in my eclipse so each time i dont have to open cmd and write these commands
Add the script as an External Tool (Program type) and you'll be able to fire it off from the toolbar.