在 Powershell 中执行 if else 条件时出错
Error while executing if else condition in Powershell
我正在尝试执行 if & else 代码但无法通过条件
{
if(($ENV_TYPE = 'Dev') && ($REGION_CODE = 'eus2'))
{
}
else
{
}
}
env_type
和 region_code
值均来自环境变量
我收到这个错误:
The token '&&' is not a valid statement separator in this version.
if ($ENV_TYPE -eq 'Dev' -And $REGION_CODE -eq 'eus2'){
}
我正在尝试执行 if & else 代码但无法通过条件
{
if(($ENV_TYPE = 'Dev') && ($REGION_CODE = 'eus2'))
{
}
else
{
}
}
env_type
和 region_code
值均来自环境变量
我收到这个错误:
The token '&&' is not a valid statement separator in this version.
if ($ENV_TYPE -eq 'Dev' -And $REGION_CODE -eq 'eus2'){
}