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

fix(install): Allow installing specific version if latest is installed #3694

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ If you've built software that you'd like others to use, Scoop is an alternative

## Installation

Run this command from your PowerShell to install scoop to its default location (`C:\Users\<user>\scoop`)
Run the following command from your PowerShell to install scoop to its default location (`C:\Users\<user>\scoop`)

```powershell
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')

# or shorter
iwr -useb get.scoop.sh | iex
```

Once installed, run `scoop help` for instructions.
Expand All @@ -76,19 +79,20 @@ The default setup is configured so all user installed programs and Scoop itself
Globally installed programs (`--global`) live in `C:\ProgramData\scoop`.
These settings can be changed through environment variables.

### Install Scoop to a Custom Directory
### Install Scoop to a Custom Directory by changing `SCOOP`

```powershell
$env:SCOOP='D:\Applications\Scoop'
[Environment]::SetEnvironmentVariable('SCOOP', $env:SCOOP, 'User')
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# run the installer
```

### Configure Scoop to install global programs to a Custom Directory
### Configure Scoop to install global programs to a Custom Directory by changing `SCOOP_GLOBAL`

```powershell
$env:SCOOP_GLOBAL='F:\GlobalScoopApps'
[Environment]::SetEnvironmentVariable('SCOOP_GLOBAL', $env:SCOOP_GLOBAL, 'Machine')
# run the installer
```

## [Documentation](https://github.com/lukesampson/scoop/wiki)
Expand Down Expand Up @@ -146,11 +150,11 @@ The following buckets are known to scoop:

The main bucket is installed by default. To add any of the other buckets, type:
```
> scoop bucket add bucketname
scoop bucket add bucketname
```
For example, to add the extras bucket, type:
```
> scoop bucket add extras
scoop bucket add extras
```

## Other application buckets
Expand Down
2 changes: 1 addition & 1 deletion bin/install.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#Requires -Version 5

# remote install:
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
$old_erroractionpreference = $erroractionpreference
$erroractionpreference = 'stop' # quit if anything goes wrong

Expand Down
4 changes: 2 additions & 2 deletions libexec/scoop-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ if (is_scoop_outdated) {
}

if ($apps.length -eq 1) {
$app, $null, $null = parse_app $apps
if (is_installed $app $global) {
$app, $null, $version = parse_app $apps
if ($null -eq $version -and (is_installed $app $global)) {
return
}
}
Expand Down