Add validation to env vars
This commit is contained in:
1 parent
e5a932f62f
commit
6ac8d54144
2 files changed
+10
No files matched your search
@@ -19,6 +19,11 @@ const args = parser.parse_args()
|
||||
const filename = args.filename;
|
||||
|
||||
const config = getEnvVars();
|
||||
['ROKU_DEV_TARGET', 'ROKU_DEVPASSWORD'].forEach((key) => {
|
||||
if (!config[key]) {
|
||||
throw new Error(`Missing environment variable ${key}`);
|
||||
}
|
||||
});
|
||||
|
||||
const options = {
|
||||
host: config.ROKU_DEV_TARGET,
|
||||
|
||||
Reference in new issue
Block a user