Skip to content

Commit 7b35e19

Browse files
authored
fix(perf): Do not call scoop externally from inside the code (#5695)
* fix: do not call `scoop` externally from inside the code * update CHANGELOG.md * update CHANGELOG.md
1 parent 6cdcc75 commit 7b35e19

5 files changed

+5
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
- **scoop-update:** Change error message to a better instruction ([#5677](https://github.com/ScoopInstaller/Scoop/issues/5677))
3838
- **shim:** Check literal path in `Get-ShimPath` ([#5680](https://github.com/ScoopInstaller/Scoop/issues/5680))
3939
- **shim:** Avoid unexpected output of `list` subcommand ([#5681](https://github.com/ScoopInstaller/Scoop/issues/5681))
40+
- **scoop:** Do not call `scoop` externally from inside the code ([#5695](https://github.com/ScoopInstaller/Scoop/issues/5695))
4041

4142
### Performance Improvements
4243

libexec/scoop-create.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function choose_item($list, $query) {
5959
}
6060

6161
if (!$url) {
62-
scoop help create
62+
& "$PSScriptRoot\scoop-help.ps1" create
6363
} else {
6464
create_manifest $url
6565
}

libexec/scoop-download.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if (is_scoop_outdated) {
4343
if ($opt.u -or $opt.'no-update-scoop') {
4444
warn "Scoop is out of date."
4545
} else {
46-
scoop update
46+
& "$PSScriptRoot\scoop-update.ps1"
4747
}
4848
}
4949

libexec/scoop-install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ if (is_scoop_outdated) {
5656
if ($opt.u -or $opt.'no-update-scoop') {
5757
warn "Scoop is out of date."
5858
} else {
59-
scoop update
59+
& "$PSScriptRoot\scoop-update.ps1"
6060
}
6161
}
6262

libexec/scoop-virustotal.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if (is_scoop_outdated) {
4343
if ($opt.u -or $opt.'no-update-scoop') {
4444
warn 'Scoop is out of date.'
4545
} else {
46-
scoop update
46+
& "$PSScriptRoot\scoop-update.ps1"
4747
}
4848
}
4949

0 commit comments

Comments
 (0)