Skip to content

Commit

Permalink
refactor(unix): Remove unix.ps1 (#5235)
Browse files Browse the repository at this point in the history
  • Loading branch information
niheaven authored Nov 10, 2022
1 parent 29ed3cb commit 0f79573
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

- **hash:** Use `Get-FileHash()` directly ([#5177](https://github.com/ScoopInstaller/Scoop/issues/5177))
- **installer:** Drop the old installer ([#5186](https://github.com/ScoopInstaller/Scoop/issues/5186))
- **unix:** Remove `unix.ps1` ([#5235](https://github.com/ScoopInstaller/Scoop/issues/5235))

### Builds

Expand Down
3 changes: 1 addition & 2 deletions bin/auto-pr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ param(

. "$PSScriptRoot\..\lib\manifest.ps1"
. "$PSScriptRoot\..\lib\json.ps1"
. "$PSScriptRoot\..\lib\unix.ps1"

if ($App -ne '*' -and (Test-Path $App -PathType Leaf)) {
$Dir = Split-Path $App
Expand All @@ -92,7 +91,7 @@ Optional options:
exit 0
}

if (is_unix) {
if ($IsLinux -or $IsMacOS) {
if (!(which hub)) {
Write-Host "Please install hub ('brew install hub' or visit: https://hub.github.com/)" -ForegroundColor Yellow
exit 1
Expand Down
1 change: 0 additions & 1 deletion bin/checkhashes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ param(
. "$PSScriptRoot\..\lib\json.ps1"
. "$PSScriptRoot\..\lib\versions.ps1"
. "$PSScriptRoot\..\lib\install.ps1"
. "$PSScriptRoot\..\lib\unix.ps1"

$Dir = Convert-Path $Dir
if ($ForceUpdate) { $Update = $true }
Expand Down
1 change: 0 additions & 1 deletion bin/checkver.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ param(
. "$PSScriptRoot\..\lib\json.ps1"
. "$PSScriptRoot\..\lib\versions.ps1"
. "$PSScriptRoot\..\lib\install.ps1" # needed for hash generation
. "$PSScriptRoot\..\lib\unix.ps1"

if ($App -ne '*' -and (Test-Path $App -PathType Leaf)) {
$Dir = Split-Path $App
Expand Down
4 changes: 2 additions & 2 deletions lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1256,10 +1256,10 @@ if ($scoopConfig) {
# END NOTE

# Scoop root directory
$scoopdir = $env:SCOOP, (get_config ROOT_PATH), "$env:USERPROFILE\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
$scoopdir = $env:SCOOP, (get_config ROOT_PATH), "$([System.Environment]::GetFolderPath('UserProfile'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1

# Scoop global apps directory
$globaldir = $env:SCOOP_GLOBAL, (get_config GLOBAL_PATH), "$env:ProgramData\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1
$globaldir = $env:SCOOP_GLOBAL, (get_config GLOBAL_PATH), "$([System.Environment]::GetFolderPath('CommonApplicationData'))\scoop" | Where-Object { -not [String]::IsNullOrEmpty($_) } | Select-Object -First 1

# Scoop cache directory
# Note: Setting the SCOOP_CACHE environment variable to use a shared directory
Expand Down
21 changes: 0 additions & 21 deletions lib/unix.ps1

This file was deleted.

0 comments on commit 0f79573

Please sign in to comment.