Skip to content

← All questions

Our CI step passes even when lint fails — checking for exit code 1 was wrong?

Asked 9,930 views1 answer

Someone wrote our pipeline step defensively:

bash
sdods lint -p demo-shop
if [ "$?" = "1" ]; then echo "lint failed"; exit 1; fi

A branch went in last week with two scenarios missing their suite tag and the step was green. Running it by hand I can see the findings printed, so lint is definitely finding them. What does it actually exit with?

asked by Rafa Garrido12,996 ·

1 answer

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related