Closed romain-gilles-ultra closed 5 months ago
Can you write a proper PR description explaining what you believe the problem is and why this is the correct solution?
Hi @lihaoyi Sorry for this PR hope it's better now :hugs:
@romain-gilles-ultra thanks! Can you verify that passing in flags like ./mill -i -j 4 __.compile
and ./mill -ij4 __.compile
continues to work
Hi @lihaoyi Sorry for the delay but yes it works ;)
Context
There is an issue in the build pipeline the following job is falling:
The issue is coming from the
./mill
sh
script here:If you pass
-i
or--import
it will match the if statement and more precisely the[ "${1%"-i"*}" != "$1" ]
part of the if statement.Solution
Looking at the POSIX documentation of the: POSIX shell variables and parameter substitution
It sounds like
%
matches and substitutes the end of the parameter which explains the issue. While the following approach uses the beginning of the parameter:So by replacing
[ "${1%"-i"*}" != "$1" ]
by[ "${1#"-i"}" != "$1" ]
it should solve it :crossed_fingers: