[ https://issues.apache.org/jira/browse/MWRAPPER-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Slawomir Jaranowski updated MWRAPPER-123: ----------------------------------------- Component/s: Maven Wrapper Scripts > only-mvnw fails on ksh printf implementations > --------------------------------------------- > > Key: MWRAPPER-123 > URL: https://issues.apache.org/jira/browse/MWRAPPER-123 > Project: Maven Wrapper > Issue Type: Bug > Components: Maven Wrapper Scripts > Affects Versions: 3.1.1 > Reporter: Benjamin Marwell > Assignee: Benjamin Marwell > Priority: Urgent > Fix For: 3.3.0 > > > the script {{only-mvnw}} contains this snippet in a line to calculate a hash: > {code:bash} > printf %d "'$str" > {code} > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)