Skip to content

Commit

Permalink
fix: validation error for the flag
Browse files Browse the repository at this point in the history
  • Loading branch information
asad9711 committed Mar 9, 2023
1 parent 1731de9 commit e5de429
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}

//validate that if npm_via_tunnel is set, tunnel must be set to true
if (lt_config["run_settings"]["npm_via_tunnel"]==true && lt_config["tunnel_settings"]["tunnel"] ==false){
reject("Error!! Installing npm packages behind private VPN is supported only with tunnel. Please pass tunnel as true.")
}else{
console.log("Warning!! Using the flag `npm_via_tunnel` may result in higher build duration.")
if (lt_config["run_settings"]["npm_via_tunnel"]==true)
{
if (lt_config["tunnel_settings"]["tunnel"] ==false){
reject("Error!! Installing npm packages behind private VPN is supported only with tunnel. Please pass tunnel as true.");
}else{
console.log("Warning!! Using the flag `npm_via_tunnel` may result in higher build duration.");
}
}

if(lt_config)
Expand Down

0 comments on commit e5de429

Please sign in to comment.