I am running bash on windows (not the fancy new thing on windows 10, mingw bash) and from there shake
. From what I understand it is possible for a command on windows to edit the environment of cmd
. In my usecase I don't want to make assumptions on how the environment will be changed, I just want the next command to run in that changed environment. Is that possible?
The ideal scenario would be something like
(Environment env, Stdout out) <- cmd Shell (Cwd dir) "path/to/script.cmd" [arg1] [arg2]
-- Do stuff with out
cmd Shell (Cwd dir) (Env env) "env/dependent/command.cmd"
I would also be happy with running both commands in the same shell even if it means that I can't Do stuff with out
but I couldn't figure out how to do that either
I guess in makefile terms what I want is similar to .ONESHELL: