air icon indicating copy to clipboard operation
air copied to clipboard

:sparkles: Added support for custom shell

Open udaya2899 opened this issue 4 years ago • 4 comments

Gives the user, option to use a custom bash shell instead of executing with default "sh" hardcoded.

Fixes #77

Now, add shell = <shell_name> in .air.conf file and air builds using the specific shell. Example, shell = bash shell = dash shell = zsh

cmd runs in the respective shell name specified.

Use case:

  1. If user has a custom environment variables as a .env file and wants to source it every time before building. If user uses bash for development locally, can add shell = bash in .air.conf and the command specified as cmd = ... will execute as /bin/bash and not as /bin/sh

My use case: I used bash to source a file with command source dev.env and source doesn't work in sh, the alternative didn't work too as explained in #77

udaya2899 avatar Jul 02 '20 14:07 udaya2899

Hello @cosmtrek Can you check this out

udaya2899 avatar Jul 06 '20 15:07 udaya2899

@xiantang Can you please verify this, I'd like to share the project with colleagues, please refer to the issue and my PR. It has been stale for long. Thanks in advance

udaya2899 avatar Jul 25 '20 15:07 udaya2899

@udaya2899 i will verify this soon. and I think we maybe not need to add a new Field shell. it maybe cause use to config more. we can talk about this.

xiantang avatar Jul 26 '20 06:07 xiantang

I can understand the overhead it creates on each additional config variable. Please suggest alternatives if available. I'll want to use bash instead.

udaya2899 avatar Jul 26 '20 09:07 udaya2899