mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 09:32:41 +00:00
refactor: remove explicit check for environment variable
This commit is contained in:
@@ -30,13 +30,6 @@ process.on('unhandledRejection', async (err) => {
|
|||||||
process.exit(1);
|
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);
|
const gitlabApi = new Api(GITLAB_API_URL, process.env.GITLAB_PRIVATE_TOKEN as string);
|
||||||
|
|
||||||
if (existsSync(join(__dirname, 'package.json'))) {
|
if (existsSync(join(__dirname, 'package.json'))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user