I'm using a gradle plugin written in Kotlin which seems to toggle between flawless victory and disastrous failure and I can't find out why.
Code snippet:
project.exec {
val command = "aws ssm get-parameter --name /config/testconfig/secrets --with-decryption"
commandLine(command.split(" "))
standardOutput = FileOutputStream(secretsJson)
}
This does work from time to time and downloads the Systems Manager properties to a JSON file and all of a sudden doesn't anymore. It's unable to resolve the path to aws, even though /usr/local/bin
is in the PATH. The binary is found in /usr/local/Cellar/awscli/1.16.250/libexec/bin/aws
though and linked in /usr/local/bin
. If called directly the command can be executed without issues.
I've checked the environment variables of both my terminal and my local gradle wrapper and PATH is exactly the same in both.
My colleague is able to run both on his machine (both on macOS).
Any ideas? I'm ... exhausted.