Skip to content

Commit

Permalink
feat(install): Added the ability to specify @ version when installing…
Browse files Browse the repository at this point in the history
… from url/file location (#5988)
  • Loading branch information
insertokername committed May 23, 2024
1 parent c9048ad commit 700a2f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- **scoop-search:** Use SQLite for caching apps to speed up local search ([#5851](https://github.com/ScoopInstaller/Scoop/issues/5851), [#5918](https://github.com/ScoopInstaller/Scoop/issues/5918), [#5946](https://github.com/ScoopInstaller/Scoop/issues/5946), [#5949](https://github.com/ScoopInstaller/Scoop/issues/5949), [#5955](https://github.com/ScoopInstaller/Scoop/issues/5955), [#5966](https://github.com/ScoopInstaller/Scoop/issues/5966), [#5967](https://github.com/ScoopInstaller/Scoop/issues/5967), [#5981](https://github.com/ScoopInstaller/Scoop/issues/5981))
- **core:** New cache filename format ([#5929](https://github.com/ScoopInstaller/Scoop/issues/5929))
- **install:** Added the ability to install specific version of app from URL/file link ([#5988](https://github.com/ScoopInstaller/Scoop/issues/5988))

### Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion lib/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ function applist($apps, $global) {
}

function parse_app([string]$app) {
if ($app -match '^(?:(?<bucket>[a-zA-Z0-9-_.]+)/)?(?<app>.*\.json$|[a-zA-Z0-9-_.]+)(?:@(?<version>.*))?$') {
if ($app -match '^(?:(?<bucket>[a-zA-Z0-9-_.]+)/)?(?<app>.*\.json|[a-zA-Z0-9-_.]+)(?:@(?<version>.*))?$') {
return $Matches['app'], $Matches['bucket'], $Matches['version']
} else {
return $app, $null, $null
Expand Down
6 changes: 6 additions & 0 deletions libexec/scoop-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
# To install an app from a manifest at a URL:
# scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/runat.json
#
# To install a different version of the app from a URL:
# scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/neovim.json@0.9.0
#
# To install an app from a manifest on your computer
# scoop install \path\to\app.json
#
# To install an app from a manifest on your computer
# scoop install \path\to\app.json@version
#
# Options:
# -g, --global Install the app globally
# -i, --independent Don't install dependencies automatically
Expand Down

0 comments on commit 700a2f4

Please sign in to comment.