Slackbot
05/30/2023, 9:38 AMVampire
05/30/2023, 9:50 AMui
.Adam
05/30/2023, 1:29 PMVampire
05/30/2023, 1:30 PMui
after the build was successful already, should it?Adam
05/30/2023, 1:34 PMAdam
05/30/2023, 1:34 PMui
arg that isn’t being passed correctlyIgor Wojda
06/01/2023, 9:45 AM@
character that messed up power shell interpreter - password has @ui
suffix, so thats why we have seen "`ui' is not recognized` error (I know, what is the chance of that, right? 😂😅). See attached image.
Since password value was inserted by CI from the secret escaping one character was not an option here.
My various tries of escaping this parameter has failed...
Escape Try 1
./gradlew publishToMavenLocal "-P konsist.ossrhPassword=D2X*6df!p&@ui" "-P konsist.ossrhKey=my key"
Escape Try 2
./gradlew publishToMavenLocal -P "konsist.ossrhPassword=D2X*6df!p&@ui" -P "konsist.ossrhKey=my key"
Escape Try 3
./gradlew publishToMavenLocal -P konsist.ossrhPassword="D2X*6df!p&@ui" -P konsist.ossrhKey="my key"
Also tried all of the above with singe quotes and played with -- and --%
... so I made it work by changing the password. Main take away here is that @
character does not play well with power shell.
One mistery is from where this error really comes from - I am still not sure if this is a Gradle error or power shell error - perhaps power shell interprets part of the command, runs Gradle and then it interprets rest of the command 🤔
@BTW @Adam it looks like windows has gpgagent installed by defaultVampire
06/01/2023, 10:54 AMI am still not sure if this is a Gradle error or power shell error - perhaps power shell interprets part of the command, runs Gradle and then it interprets rest of the commandYes, same as with your other problem regarding the dot. Powershell is interpreting stuff and then goes on. The main problem is not the
@
but the &
which in the PowerShell interpretation means to call something and use its result.
I wonder that the error is only displayed after the Gradle run though.
To mitigate it, you can for example use the same PowerShell switch to prevent parameter interpretation:
./gradlew --% -P "konsist.ossrhPassword=D2X*6df!p&@ui"
It would also work to quote within the quotes like
./gradlew -P '"konsist.ossrhPassword=D2X*6df!p&@ui"'
or
./gradlew -P 'konsist.ossrhPassword="D2X*6df!p&@ui"'
or
./gradlew -P "konsist.ossrhPassword=""D2X*6df!p&@ui"""
or
./gradlew -P """konsist.ossrhPassword=D2X*6df!p&@ui"""
Adam
06/01/2023, 11:31 AM@
is the most practical solution!Vampire
06/01/2023, 11:36 AM&
, the @
is not a problem at all, that's just a red herring.Vampire
06/01/2023, 11:41 AM