This message was deleted.
# community-support
s
This message was deleted.
v
Are you sure this is coming from Gradle? The Gradle run looks already finished. And it seems whatever you use then tries to run a commandline utility called
ui
.
a
Possibly you’re trying to sign, and the gpgagent is available on Ubuntu but not on Windows?https://docs.gradle.org/8.1.1/userguide/signing_plugin.html#sec:using_gpg_agent
v
But that shouldn't complain about a missing executable called
ui
after the build was successful already, should it?
a
my guess is that it tries to sign, but fails because of some malformed command or input, but it somehow fails gracefully, and also Gradle doesn’t show the output stream chronologically
👌 1
like if gpg has some
ui
arg that isn’t being passed correctly
i
It was rocky ride, but I was able to figure this one out thanks to your help and comments. So it turned out that one of the parameters containing password had
@
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...
Copy code
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 default
v
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
Yes, 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:
Copy code
./gradlew --% -P "konsist.ossrhPassword=D2X*6df!p&@ui"
It would also work to quote within the quotes like
Copy code
./gradlew -P '"konsist.ossrhPassword=D2X*6df!p&@ui"'
or
Copy code
./gradlew -P 'konsist.ossrhPassword="D2X*6df!p&@ui"'
or
Copy code
./gradlew -P "konsist.ossrhPassword=""D2X*6df!p&@ui"""
or
Copy code
./gradlew -P """konsist.ossrhPassword=D2X*6df!p&@ui"""
a
if you’re running on GitHub actions you can set the shell to ‘bash’, even on Windows runners. Maybe that helps? But removing the
@
is the most practical solution!
v
You mean removing the
&
, the
@
is not a problem at all, that's just a red herring.
But yeah, not using PowerShell is probably the easiest to mitigate all problems and get consistent behavior.