air icon indicating copy to clipboard operation
air copied to clipboard

Option to use bash instead of sh

Open udaya2899 opened this issue 4 years ago • 2 comments

I have my environment variables in a file called dev.env which I'd want to source by executing source dev.env before building, since the cmd command is executed inside a sh and not bash, I cannot source the file.

I tried doing the following

cmd = ". ./dev.env && go build -o ./tmp/main ."

But it doesn't work. The variables exported in dev.env doesn't impact the project. It'd be great if cmd command was executed using bash inside air and all this would work like usual I believe

INFO: I am running air in bash shell, dev.env is in root of project directory

TL;DR Need bash support

udaya2899 avatar Jul 01 '20 19:07 udaya2899

The fix that I'm temporarily using is, to run air, I go with the default .air.conf file without any changes, but execute air command as

source dev.env && air - This works

udaya2899 avatar Jul 01 '20 20:07 udaya2899

Hello @cosmtrek, Please respond to PR/Issue about your opinions

udaya2899 avatar Jul 02 '20 18:07 udaya2899