Use bash
@@ -70,7 +70,7 @@ stage("Compare changes") {
])
// Check if git diff vs origin/master contains changes outside of ignored directories
gitChanges = sh (
- script: """
+ script: """#!/bin/bash
git diff --name-only testremote/${BRANCH_NAME} origin/master | grep --invert-match --extended-regexp \'${IGNORED_DIRS}\' --no-messages || [[ \$? == 1 ]]
""",
returnStdout: true,
