Adding
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*eslint-disable*/
|
||||
/*
|
||||
Returns Error When Docker Environment Variable is NOT present.
|
||||
|
||||
When used with || will SKIP the next step when ENV_IS_DOCKER is true
|
||||
> node isDockerEnv.js || node version.js
|
||||
|
||||
When used with && will stop scripts from running when ENV_IS_DOCKER is missing or false and error out
|
||||
> node isDockerEnv.js && node test.js
|
||||
*/
|
||||
if (process.env.ENV_IS_DOCKER) {
|
||||
console.log("isDockerEnv: Script is running in Docker.");
|
||||
process.exit(0);
|
||||
}
|
||||
process.exit(1);
|
||||
Reference in New Issue
Block a user