@@ -67,7 +67,7 @@ function _WriteOut {
6767
6868# ## Constants
6969$ProductVersion = " 1.0.0"
70- $BuildVersion = " beta7-10410 "
70+ $BuildVersion = " beta8-15502 "
7171$Authors = " Microsoft Open Technologies, Inc."
7272
7373# If the Version hasn't been replaced...
@@ -359,7 +359,7 @@ function Get-RuntimeAlias {
359359 if ($Aliases -eq $null ) {
360360 _WriteDebug " Scanning for aliases in $AliasesDir "
361361 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 )))}} )
363363 } else {
364364 $Aliases = @ ()
365365 }
@@ -396,18 +396,20 @@ function Get-RuntimeAliasOrRuntimeInfo(
396396filter List-Parts {
397397 param ($aliases )
398398
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
402404 }
403- $active = IsOnPath $binDir
404-
405+ $active = IsOnPath $binDir
406+
405407 $fullAlias = " "
406408 $delim = " "
407409
408410 foreach ($alias in $aliases ) {
409411 if ($_.Name.Split (' \' , 2 ) -contains $alias.Name ) {
410- $fullAlias += $delim + $alias.Alias
412+ $fullAlias += $delim + $alias.Alias + ( & { if ( $alias .Orphan ){ " (missing) " }})
411413 $delim = " , "
412414 }
413415 }
@@ -416,7 +418,7 @@ filter List-Parts {
416418 $parts2 = $parts1 [0 ].Split(' -' , 4 )
417419
418420 if ($parts1 [0 ] -eq " $RuntimePackageName -mono" ) {
419- $parts2 += " linux/darwin "
421+ $parts2 += " linux/osx "
420422 $parts2 += " x86/x64"
421423 }
422424
@@ -426,7 +428,7 @@ filter List-Parts {
426428 Runtime = $parts2 [1 ]
427429 OperatingSystem = $parts2 [2 ]
428430 Architecture = $parts2 [3 ]
429- Location = $_ .Parent.FullName
431+ Location = $location
430432 Alias = $fullAlias
431433 }
432434}
@@ -925,7 +927,7 @@ function dnvm-help {
925927 _WriteOut - ForegroundColor $ColorScheme.Help_Header " commands: "
926928 Get-Command " $CommandPrefix *" |
927929 ForEach-Object {
928- if ($Host.Version.MajorVersion -lt 3 ) {
930+ if ($Host.Version.Major -lt 3 ) {
929931 $h = Get-Help $_.Name
930932 } else {
931933 $h = Get-Help $_.Name - ShowWindow:$false
@@ -978,6 +980,10 @@ function dnvm-list {
978980 }
979981 }
980982
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+
981987 if ($PassThru ) {
982988 $items
983989 } else {
0 commit comments