refactor: remove explicit check for environment variable

This commit is contained in:
Karl-Philipp Wulfert
2019-07-05 16:05:40 +02:00
parent c34b736edd
commit 8f3478911f

View File

@@ -30,13 +30,6 @@ process.on('unhandledRejection', async (err) => {
process.exit(1);
});
// check that environment variable GITLAB_PRIVATE_TOKEN is set
if (typeof process.env.GITLAB_PRIVATE_TOKEN !== 'string' || process.env.GITLAB_PRIVATE_TOKEN.length === 0) {
// tslint:disable-next-line:no-floating-promises
Logger.error('Environment variable GITLAB_PRIVATE_TOKEN is not set!');
process.exit(1);
}
const gitlabApi = new Api(GITLAB_API_URL, process.env.GITLAB_PRIVATE_TOKEN as string);
if (existsSync(join(__dirname, 'package.json'))) {