groovy
  1. groovy
  2. GROOVY-2375

"groovy" launcher broken on Cygwin

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 1.5.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP SP2, Cygwin
    • Number of attachments :
      0

      Description

      Running Groovy scripts on Cygwin when GROOVY_HOME contains spaces doesn't work anymore. The inclusion of the "-Dscript.name" (r4863) broke it (it worked fine up to r4241).

        Issue Links

          Activity

          Hide
          Russel Winder added a comment -

          By doing a trivial but subtle rearrangement in the ARGUMENTS processing in startGroovy, I think I have circumvented (not fixed) Michael's problem. I suspect though that there are new space problems that will haunt us.

          I am still not sure there is a quoting of the -Dscript.name that fixes Daniel's problem.

          Show
          Russel Winder added a comment - By doing a trivial but subtle rearrangement in the ARGUMENTS processing in startGroovy, I think I have circumvented (not fixed) Michael's problem. I suspect though that there are new space problems that will haunt us. I am still not sure there is a quoting of the -Dscript.name that fixes Daniel's problem.
          Hide
          Daniel Serodio added a comment -

          Russel, you'll have to blame Bill for the spaces in filenames . I guess M$ got so carried away by the possibility of having spaces in filenames that they put them everywhere they could.
          "C:\Programs" or "Applications" would be much better, but they had to use a long name and put a space there. Same for "Documents and Settings" (which BTW, because "Users" in Vista).

          </rant>

          I think I've fixed it, by undoing the mentioned change, defining a SCRIPT_NAME=$0 variable in groovy and adding -Dscript.name=$SCRIPT_NAME to startGroovy, but I'll have to test some more.

          Should I create a patch? Against which version?

          Show
          Daniel Serodio added a comment - Russel, you'll have to blame Bill for the spaces in filenames . I guess M$ got so carried away by the possibility of having spaces in filenames that they put them everywhere they could. "C:\Programs" or "Applications" would be much better, but they had to use a long name and put a space there. Same for "Documents and Settings" (which BTW, because "Users" in Vista). </rant> I think I've fixed it, by undoing the mentioned change, defining a SCRIPT_NAME=$0 variable in groovy and adding -Dscript.name=$SCRIPT_NAME to startGroovy , but I'll have to test some more. Should I create a patch? Against which version?
          Hide
          Russel Winder added a comment -

          It seems I was over confident of my little hack to cure the "println 1" problem. It is back. I shall work on it more though.

          Show
          Russel Winder added a comment - It seems I was over confident of my little hack to cure the "println 1" problem. It is back. I shall work on it more though.
          Hide
          Russel Winder added a comment -

          I just tried your idea and it works like a charm, In fact, I think removing the setting of the JAVA_OPTS from the groovy scripts and then putting SCRIPT_PATH="$0" in startGroovy and then the -D line in the exec statement, provides a solution for all the scripts.

          I shall commit this and then see if I embarrass myself again

          Show
          Russel Winder added a comment - I just tried your idea and it works like a charm, In fact, I think removing the setting of the JAVA_OPTS from the groovy scripts and then putting SCRIPT_PATH="$0" in startGroovy and then the -D line in the exec statement, provides a solution for all the scripts. I shall commit this and then see if I embarrass myself again
          Hide
          Russel Winder added a comment -

          I have reverted a refactoring and fiddled a bit and now all the cases listed here seem to work as they should. I suspect though that there are many more issues left to find in teh case of Cygwin. The problem is all the parameter processing that goes on to try and convert path names.

          Show
          Russel Winder added a comment - I have reverted a refactoring and fiddled a bit and now all the cases listed here seem to work as they should. I suspect though that there are many more issues left to find in teh case of Cygwin. The problem is all the parameter processing that goes on to try and convert path names.

            People

            • Assignee:
              Russel Winder
              Reporter:
              Daniel Serodio
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: