<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 30, 2014 at 2:25 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/30/2014 01:55 PM, Richard Shaw wrote:<br>
> I'm working on a big update to the FindFLTK module and I'm<br>
> testing it on all platforms I have access to.<br>
><br>
> One problem that took me quite a while to figure out was that<br>
> on *nix systems, execute_process works with shell scripts but<br>
> on my MSYS2 install it does not, I have to prefix the command<br>
> with "sh" to make sure it executes in a shell.<br>
><br>
> Is this known/expected?<br>
<br>
</span>Yes.  It is not execute_process, but the underlying operating<br>
system process launching rules.  A shell script starts in a<br>
"shebang" (#!) line that the OS knows how to interpret to<br>
decide what program to run to launch the script.  Windows does<br>
not know how to do this so we have to specify a shell explicitly.<br>
MSYS is Windows, not POSIX/Cygwin.<br></blockquote><div><br></div><div>I figured as much but wanted to verify. </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Should I prefix shell scripts with "sh" in all cases and not<br>
> count on it to work? Or should I test for MSYS and only prefix<br>
> the command with "sh" there?<br>
<br>
</span>Using 'sh' should be safe.</blockquote><div><br></div><div>Good to know. Thanks!</div><div><br></div><div>Richard </div></div></div></div>