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