Details

      Description

      scala -Dprop=value -e "println(System.getProperty(\"prop\"))"

      output

      null

      this problem does not appear on Linux or Mac

      This pull request https://github.com/scala/scala/pull/1957 based on the 2nd attachment to this bug did not address all the issues. From the pull request discussion:

      • While this parses the -D and -J options, they also get passed as arguments to the class that is run in the end (and I expect that trying to fix this would make the other problems much worse)
      • Quoted -J options are silently dropped
      • Single-quoted -D options are silently dropped
      • Double-quoted -D options are either silently dropped or result in an error

        Activity

        Hide
        huynhjl added a comment -

        My attempt at fixing SI-4614 and SI-4615.

        Show
        huynhjl added a comment - My attempt at fixing SI-4614 and SI-4615 .
        Hide
        huynhjl added a comment -

        I just tested my patch with the -e "println(System.getProperty(\"prop\"))" argument and my patch does not work on that... I guess I'll give it another try later.

        Show
        huynhjl added a comment - I just tested my patch with the -e "println(System.getProperty(\"prop\"))" argument and my patch does not work on that... I guess I'll give it another try later.
        Hide
        huynhjl added a comment -

        Second take on the fix.

        Show
        huynhjl added a comment - Second take on the fix.
        Show
        James Iry added a comment - https://github.com/scala/scala/pull/1957
        Hide
        James Iry added a comment - - edited

        Turns out fix wasn't complete. See discussion on the pull. I'm kicking the fix version and assigning to community since I don't have a working Windows environment for development.

        Show
        James Iry added a comment - - edited Turns out fix wasn't complete. See discussion on the pull. I'm kicking the fix version and assigning to community since I don't have a working Windows environment for development.
        Hide
        Antoine Gourlay added a comment -

        A new tentative fix for this: https://github.com/scala/scala/pull/2767.

        Show
        Antoine Gourlay added a comment - A new tentative fix for this: https://github.com/scala/scala/pull/2767 .

          People

          • Assignee:
            Antoine Gourlay
            Reporter:
            centaur
          • Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development