inside-ci/in.js
Jonatan Nilsson d46e0d834e
Some checks failed
/ deploy (push) Failing after 14s
Minimize it further and clean it up
2024-11-22 05:08:16 +00:00

12 lines
297 B
JavaScript
Executable file

#!/usr/bin/env node
let is = module.exports.insideCi = () => {
// Bail out if CI is overrided
return process.env.CI === 'false'
? false
: !!['CI','CI_APP_ID','BUILD_NUMBER','CI_NAME','RUN_ID'].some(x => process.env[x])
}
if (require.main === module) {
process.exit(is() ? 0 : 1)
}