Skip to content

Conversation

@asrichesson
Copy link
Contributor

While trying to automate installing tilt, I came across this issue. (I don't have scoop installed)

$script:ErrorActionPreference = 'Stop'
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.ps1'))

throws the error

Line |
  14 |  if (Get-Command "scoop" 2>$null) {
     |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The term 'scoop' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

This change prevents the scoop check from throwing an error while also allowing me to stop the installation if it throws a real error.

Copy link
Member

@nicks nicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! lgtm

@nicks nicks merged commit 1482d27 into tilt-dev:master Jan 28, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants