shared_libs/vars/cmd.groovy
2023-04-17 01:01:49 +02:00

14 lines
303 B
Groovy

def call(command) {
if (command instanceof ArrayList)
command = concatCommandFromArray(command)
if (env.VERBOSE == "true")
echo command
if (isUnix()) {
sh "${command}"
} else {
bat(encoding: 'utf-8', script: "chcp 65001 > nul\n ${command}")
}
}