Draft fixes for windows builds. by jnthntatum · Pull Request #1811 · google/cel-cpp
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jnthntatum - just randomly ran into this since I was thinking of sending a different PR for this file that got updated overnight. I am looking in the context of Envoy and noticed that the previous form could have been made to work by adding use_default_shell_env = True so that PATH is properly exported within the command. By default, bash starts with an empty env, and on msys64 that results in PATH set as a shell variable, not an exported environment variable that could be used by xargs. Notably, xargs will call exec etc to run the command, which on unix use a default path defined by libc including /usr/bin, but on Windows tools under msys cannot be known to the default path which is effectively only OS binaries.
Anyways, avoiding shell completely seems even better but just wanted to let you know in case you need to go back to the shell approach for any reason