Uploaded image for project: 'Maven Wrapper'
  1. Maven Wrapper
  2. MWRAPPER-123

only-mvnw fails on ksh printf implementations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Urgent
    • Resolution: Fixed
    • 3.1.1
    • 3.3.0
    • Maven Wrapper Scripts
    • None

    Description

      the script only-mvnw contains this snippet in a line to calculate a hash:

      printf %d "'$str"
      

      The idea is to convert $str to a number, where ' has a special meaning for %d conversion. However, there is a major problem with it:

      It does not work on any ksh (and maybe other shells, too), because the behaviour of this conversion is undefined: https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html

      Instead, just do a conversion char-by-char.

      Attachments

        Issue Links

          Activity

            People

              bmarwell Benjamin Marwell
              bmarwell Benjamin Marwell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: