Error on line 137 of gradlew when executing in cygwin via SSH

When running gradlew (version 1.2) in cygwin via SSH, none of my subprojects are found - line 137 throws an error saying “subproject: command not found”. A few observations:

  • when I run the command in cygwin from the remote machine, my project builds as expected. - when I comment out the if block around line 137, leaving only the statement in the else block to execute, my remote SSH command executes with out error as expected.

Can someone tell me what this if block in gradlew does? I’ve added the code block in question below. Thanks!