diff --git a/pipelines/build/common/openjdk_build_pipeline.groovy b/pipelines/build/common/openjdk_build_pipeline.groovy index df89eff43..663c33c87 100644 --- a/pipelines/build/common/openjdk_build_pipeline.groovy +++ b/pipelines/build/common/openjdk_build_pipeline.groovy @@ -1503,7 +1503,7 @@ class Build { */ def batOrSh(command) { - if ( buildConfig.TARGET_OS == 'windows' && buildConfig.DOCKER_IMAGE ) { + if ( context.isUnix() ) { context.bat(command) } else { context.sh(command)