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