@@ -67,7 +67,7 @@ function _WriteOut {
67
67
68
68
# ## Constants
69
69
$ProductVersion = " 1.0.0"
70
- $BuildVersion = " beta7-10410 "
70
+ $BuildVersion = " beta8-15502 "
71
71
$Authors = " Microsoft Open Technologies, Inc."
72
72
73
73
# If the Version hasn't been replaced...
@@ -359,7 +359,7 @@ function Get-RuntimeAlias {
359
359
if ($Aliases -eq $null ) {
360
360
_WriteDebug " Scanning for aliases in $AliasesDir "
361
361
if (Test-Path $AliasesDir ) {
362
- $Aliases = @ (Get-ChildItem ($UserHome + " \alias\" ) | Select-Object @ {label = ' Alias' ;expression = {$_.BaseName }}, @ {label = ' Name' ;expression = {Get-Content $_.FullName }})
362
+ $Aliases = @ (Get-ChildItem ($UserHome + " \alias\" ) | Select-Object @ {label = ' Alias' ;expression = {$_.BaseName }}, @ {label = ' Name' ;expression = {Get-Content $_.FullName }}, @ { label = ' Orphan ' ; expression = { -Not ( Test-Path ( $RuntimesDir + " \ " + ( Get-Content $_ .FullName )))}} )
363
363
} else {
364
364
$Aliases = @ ()
365
365
}
@@ -396,18 +396,20 @@ function Get-RuntimeAliasOrRuntimeInfo(
396
396
filter List-Parts {
397
397
param ($aliases )
398
398
399
- $binDir = Join-Path $_.FullName " bin"
400
- if (! (Test-Path $binDir )) {
401
- return
399
+ $location = " "
400
+
401
+ $binDir = Join-Path $_.FullName " bin"
402
+ if ((Test-Path $binDir )) {
403
+ $location = $_.Parent.FullName
402
404
}
403
- $active = IsOnPath $binDir
404
-
405
+ $active = IsOnPath $binDir
406
+
405
407
$fullAlias = " "
406
408
$delim = " "
407
409
408
410
foreach ($alias in $aliases ) {
409
411
if ($_.Name.Split (' \' , 2 ) -contains $alias.Name ) {
410
- $fullAlias += $delim + $alias.Alias
412
+ $fullAlias += $delim + $alias.Alias + ( & { if ( $alias .Orphan ){ " (missing) " }})
411
413
$delim = " , "
412
414
}
413
415
}
@@ -416,7 +418,7 @@ filter List-Parts {
416
418
$parts2 = $parts1 [0 ].Split(' -' , 4 )
417
419
418
420
if ($parts1 [0 ] -eq " $RuntimePackageName -mono" ) {
419
- $parts2 += " linux/darwin "
421
+ $parts2 += " linux/osx "
420
422
$parts2 += " x86/x64"
421
423
}
422
424
@@ -426,7 +428,7 @@ filter List-Parts {
426
428
Runtime = $parts2 [1 ]
427
429
OperatingSystem = $parts2 [2 ]
428
430
Architecture = $parts2 [3 ]
429
- Location = $_ .Parent.FullName
431
+ Location = $location
430
432
Alias = $fullAlias
431
433
}
432
434
}
@@ -925,7 +927,7 @@ function dnvm-help {
925
927
_WriteOut - ForegroundColor $ColorScheme.Help_Header " commands: "
926
928
Get-Command " $CommandPrefix *" |
927
929
ForEach-Object {
928
- if ($Host.Version.MajorVersion -lt 3 ) {
930
+ if ($Host.Version.Major -lt 3 ) {
929
931
$h = Get-Help $_.Name
930
932
} else {
931
933
$h = Get-Help $_.Name - ShowWindow:$false
@@ -978,6 +980,10 @@ function dnvm-list {
978
980
}
979
981
}
980
982
983
+ $aliases | Where-Object {$_.Orphan } | ForEach-Object {
984
+ $items += $_ | Select-Object @ {label = ' Name' ;expression = {$_.Name }}, @ {label = ' FullName' ;expression = {Join-Path $RuntimesDir $_.Name }} | List- Parts $aliases
985
+ }
986
+
981
987
if ($PassThru ) {
982
988
$items
983
989
} else {
0 commit comments