Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'scoop alias list' gives errors when there are no aliases yet #4064

Closed
touatimoh opened this issue Jul 17, 2020 · 1 comment
Closed

'scoop alias list' gives errors when there are no aliases yet #4064

touatimoh opened this issue Jul 17, 2020 · 1 comment

Comments

@touatimoh
Copy link

These are the error messages:

`$ scoop alias list
Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsReadOnly.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-IsReadOnly.ps1:String) [Get-Content], ItemNot
      FoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsReadOnly.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-IsReadOnly.ps1:String) [Get-Content], ItemNot
      FoundException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsFixedSize.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\s...IsFixedSize.ps1:String) [Get-Content], ItemNotFoundEx
      ception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsFixedSize.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\s...IsFixedSize.ps1:String) [Get-Content], ItemNotFoundEx
      ception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsSynchronized.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\s...ynchronized.ps1:String) [Get-Content], ItemNotFoundEx
      ception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-IsSynchronized.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\s...ynchronized.ps1:String) [Get-Content], ItemNotFoundEx
      ception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-Keys.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Keys.ps1:String) [Get-Content], ItemNotFoundE
      xception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-Keys.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Keys.ps1:String) [Get-Content], ItemNotFoundE
      xception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-Values.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Values.ps1:String) [Get-Content], ItemNotFoun
      dException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-Values.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Values.ps1:String) [Get-Content], ItemNotFoun
      dException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-SyncRoot.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-SyncRoot.ps1:String) [Get-Content], ItemNotFo
      undException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-SyncRoot.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-SyncRoot.ps1:String) [Get-Content], ItemNotFo
      undException
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

Get-Content : Cannot find path 'C:\apps\scoop\shims\scoop-Count.ps1' because it does not exist.
At C:\apps\scoop\apps\scoop\current\lib\commands.ps1:22 char:19

  •     $line = ((Get-Content $shim_path) | Where-Object { $_.startsw ...
    
  •               ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Count.ps1:String) [Get-Content], ItemNotFound
      Exception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:91 char:20

  •     $content = Get-Content (command_path $_.Name)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\apps\scoop\shims\scoop-Count.ps1:String) [Get-Content], ItemNotFound
      Exception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:92 char:9

  •     $command = ($content | Select-Object -Skip 1).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At C:\apps\scoop\apps\scoop\current\libexec\scoop-alias.ps1:93 char:9

  •     $summary = (summary $content).Trim()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : InvokeMethodOnNull
      `

But it works after I add an alias.

Thank you

@rasa
Copy link
Member

rasa commented Oct 20, 2020

Duplicate of #3528

@rasa rasa marked this as a duplicate of #3528 Oct 20, 2020
@rasa rasa closed this as completed Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants