How to check that a command wrote nothing to stderr

I’d like to add a step in my drone build that checks a command wrote nothing to stderr
For instance lein :deps tree
I tried to add the folllowing to the commands array

      - echo "validating deps" && [[ $$(lein deps :tree) == 0 ]]

But it doesn’t work, it causes an error in the shell

/bin/sh: 27: [[: not found

My build is here

this is because [[ is a bash builtin, but Drone uses sh

Oh. I see
How would one compare numbers is sh and tell drone to fail the command when the numbers are not equal?

you might have better luck on stackoverflow where you will find some true shell scripting experts. I am not sure about number comparison, but if you want to fail a build step you would exit 1 (or any exit code greater than zero).