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 filename = args.filename;
|
||||||
|
|
||||||
const config = getEnvVars();
|
const config = getEnvVars();
|
||||||
|
['ROKU_DEV_TARGET', 'ROKU_DEVPASSWORD'].forEach((key) => {
|
||||||
|
if (!config[key]) {
|
||||||
|
throw new Error(`Missing environment variable ${key}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
host: config.ROKU_DEV_TARGET,
|
host: config.ROKU_DEV_TARGET,
|
||||||
|
|||||||
@@ -5,6 +5,11 @@ const getEnvVars = require('./get-env-vars');
|
|||||||
const rokuDeploy = require('roku-deploy');
|
const rokuDeploy = require('roku-deploy');
|
||||||
|
|
||||||
const config = getEnvVars();
|
const config = getEnvVars();
|
||||||
|
['ROKU_DEV_TARGET', 'ROKU_DEVPASSWORD', 'ROKU_SIGN_PASSWORD'].forEach((key) => {
|
||||||
|
if (!config[key]) {
|
||||||
|
throw new Error(`Missing environment variable ${key}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
host: config.ROKU_DEV_TARGET,
|
host: config.ROKU_DEV_TARGET,
|
||||||
|
|||||||
Reference in new issue
Block a user