Improve handling of wmic
output
This commit is contained in:
parent
90877645ba
commit
5fd9c28bb8
|
@ -1,3 +1,2 @@
|
|||
$drives = & wmic volume get "DriveLetter,Label";
|
||||
$env:SETUP_DRIVE = $($($drives | Select-String -Pattern "$env:SETUP_LABEL") -split "\s+")[0];
|
||||
$env:SETUP_DRIVE = (ConvertFrom-Csv ((wmic volume where "Label='$env:SETUP_LABEL'" get DriveLetter) | ForEach-Object { "$_".Trim(); })).DriveLetter;
|
||||
Set-Location (Join-Path $env:SETUP_DRIVE $env:LOCAL_PROJECT_PATH)
|
||||
|
|
Loading…
Reference in a new issue