You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second form is more useful, as it allows revolvers to be leveraged to construct commands. However, if one wants to use use the default shell (in other words, setting executable=None in the subprocess.check_call(); they must use the first form, as in the second form both options are required.
In my case, I am running Sceptre in windows, within gitbash locally. I am using exported environment vars to set my profile. My colleagues are on different macs and linux; and production deployment would likely be in ubuntu. The type of command I am trying to run:
This fails though because I left out shell. same command, but now shell is required. A few problems though:
I can't set this in a cross-platform way
setting it will run the command in a different shell, which may not inherit my exported environment var (or might not even work the same)
In a case like this, I really just want to leverage the power of the resolver to construct my command without worrying about which shells to invoke to do so. The current implementation is too rigid. It would be much friendlier if shell was an optional argument, such that one can leverage revolvers whether they want to use a different shell or not.
It should behave the same way it does as if you simply pass it a simple string; no shell executable gets set, but the command is constructed via the revolvers used
Actual behaviour
You will get an exception because the error checking in the hook couples run and shell, even though there is no reason why they need to be coupled
The text was updated successfully, but these errors were encountered:
Subject of the issue
Currently, the
!cmd
hook has two forms:run
andshell
The second form is more useful, as it allows revolvers to be leveraged to construct commands. However, if one wants to use use the default shell (in other words, setting
executable=None
in thesubprocess.check_call()
; they must use the first form, as in the second form both options are required.In my case, I am running Sceptre in windows, within gitbash locally. I am using exported environment vars to set my profile. My colleagues are on different macs and linux; and production deployment would likely be in ubuntu. The type of command I am trying to run:
The above works, but it is hard coded and therefore less than ideal. The following would be better:
This fails though because I left out
shell
. same command, but nowshell
is required. A few problems though:In a case like this, I really just want to leverage the power of the resolver to construct my command without worrying about which shells to invoke to do so. The current implementation is too rigid. It would be much friendlier if
shell
was an optional argument, such that one can leverage revolvers whether they want to use a different shell or not.Your environment
Steps to reproduce
Add something like this to a stack config:
Expected behaviour
It should behave the same way it does as if you simply pass it a simple string; no shell executable gets set, but the command is constructed via the revolvers used
Actual behaviour
You will get an exception because the error checking in the hook couples
run
andshell
, even though there is no reason why they need to be coupledThe text was updated successfully, but these errors were encountered: