Uploaded image for project: 'Apache Whirr (retired)'
  1. Apache Whirr (retired)
  2. WHIRR-271

Classpath needs to be quoted in whirr script

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 0.4.0
    • 0.5.0
    • cli
    • None
    • MacOS

    Description

      I tried to start whirr after I had my machine split into two drives and the new location has a "Macintosh HD" in the name, i.e. containing a whitespace. This broke the start like so

      larsgeorge@de1-app-mbp-2:~/Downloads/whirr-0.4.0-incubating$ bin/whirr 
      bin/whirr: line 21: [: /Volumes/Macintosh: binary operator expected
      Exception in thread "main" java.lang.NoClassDefFoundError: HD/Users/larsgeorge/Downloads/whirr-0/4/0-incubating/bin///:/Volumes/Macintosh
      Caused by: java.lang.ClassNotFoundException: HD.Users.larsgeorge.Downloads.whirr-0.4.0-incubating.bin...:.Volumes.Macintosh
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      

      I checked what the other projects do and they simply quote the classpath in the scripts. So we should have this:

      java -cp "$classpath" org.apache.whirr.cli.Main "$@"
      

      Attachments

        1. WHIRR-271.patch
          0.5 kB
          Andrei Savu

        Activity

          People

            savu.andrei Andrei Savu
            larsgeorge Lars George
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment