Skip to content

Commit

Permalink
feat(diagnostic): Add check_envs_requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Chawye Hsu authored and r15ch13 committed Feb 23, 2020
1 parent 48bb96a commit 062e6d7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/diagnostic.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,14 @@ function check_long_paths {

return $true
}

function check_envs_requirements {
if ($null -eq $env:COMSPEC) {
warn '$env:COMSPEC environment variable is missing.'
Write-Host " By default the variable should points to the cmd.exe in Windows: '%SystemRoot%\system32\cmd.exe'."

return $false
}

return $true
}

0 comments on commit 062e6d7

Please sign in to comment.