Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
- Switched elseif
- Changed `g` to `denoGlobalInstall` flag
- Moved description to the bottom
  • Loading branch information
Mqxx committed Jul 8, 2024
1 parent 1bae370 commit 1ed286e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ curl -fsSL https://deno.land/install.sh | sh
irm https://deno.land/install.ps1 | iex
```

## Install Globally

**With PowerShell:**

```powershell
$g; irm https://deno.land/install.ps1 | iex
```

## Install Specific Version

**With Shell:**
Expand Down Expand Up @@ -101,6 +93,14 @@ brew install protobuf # macOS
cargo install deno
```

## Install Globally

**With PowerShell:**

```powershell
$denoGlobalInstall; irm https://deno.land/install.ps1 | iex
```

## Install and Manage Multiple Versions

**With [asdf](https://asdf-vm.com) and [asdf-deno](https://github.com/asdf-community/asdf-deno):**
Expand Down
10 changes: 5 additions & 5 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

$ErrorActionPreference = 'Stop'

if ($v) {
$Version = "v${v}"
} elseif ($Args.Length -eq 1) {
if ($Args.Length -eq 1) {
$Version = $Args[0]
} elseif ($v) {
$Version = "v${v}"
}

$DenoInstall = $env:DENO_INSTALL
$BinDir = if ($DenoInstall) {
"${DenoInstall}\bin"
} elseif (Test-Path variable:\g) {
} elseif (Test-Path variable:\denoGlobalInstall) {
"${Env:ProgramFiles}\deno\bin"
} else {
"${Home}\.deno\bin"
Expand All @@ -39,7 +39,7 @@ tar.exe xf $DenoZip -C $BinDir

Remove-Item $DenoZip

$EnvTarget = if (Test-Path variable:\g) {
$EnvTarget = if (Test-Path variable:\denoGlobalInstall) {
[System.EnvironmentVariableTarget]::Machine
} else {
[System.EnvironmentVariableTarget]::User
Expand Down

0 comments on commit 1ed286e

Please sign in to comment.