Skip to content

[MWRAPPER-123] only-mvnw fails on ksh printf implementations #245

Closed

Description

@jira-importer

Benjamin Marwell opened MWRAPPER-123 and commented

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.


Affects: 3.1.1

Remote Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions