Skip to content

Commit 5303901

Browse files
committed
Restrict url() scope to avoid conflict with global aliases
1 parent 0920050 commit 5303901

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/depends.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ function script_deps($script) {
7777
function install_deps($manifest, $arch) {
7878
$deps = @()
7979

80-
if (!(Test-HelperInstalled -Helper 7zip) -and (Test-7zipRequirement -URL (url $manifest $arch))) {
80+
if (!(Test-HelperInstalled -Helper 7zip) -and (Test-7zipRequirement -URL (script:url $manifest $arch))) {
8181
$deps += '7zip'
8282
}
83-
if (!(Test-HelperInstalled -Helper Lessmsi) -and (Test-LessmsiRequirement -URL (url $manifest $arch))) {
83+
if (!(Test-HelperInstalled -Helper Lessmsi) -and (Test-LessmsiRequirement -URL (script:url $manifest $arch))) {
8484
$deps += 'lessmsi'
8585
}
8686
if (!(Test-HelperInstalled -Helper Innounp) -and $manifest.innosetup) {

lib/install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ function get_filename_from_metalink($file) {
200200

201201
function dl_with_cache_aria2($app, $version, $manifest, $architecture, $dir, $cookies = $null, $use_cache = $true, $check_hash = $true) {
202202
$data = @{}
203-
$urls = @(url $manifest $architecture)
203+
$urls = @(script:url $manifest $architecture)
204204

205205
# aria2 input file
206206
$urlstxt = Join-Path $cachedir "$app.txt"
@@ -526,7 +526,7 @@ function dl_urls($app, $version, $manifest, $bucket, $architecture, $dir, $use_c
526526

527527
# can be multiple urls: if there are, then msi or installer should go last,
528528
# so that $fname is set properly
529-
$urls = @(url $manifest $architecture)
529+
$urls = @(script:url $manifest $architecture)
530530

531531
# can be multiple cookies: they will be used for all HTTP requests.
532532
$cookies = $manifest.cookie
@@ -641,7 +641,7 @@ function hash_for_url($manifest, $url, $arch) {
641641

642642
if($hashes.length -eq 0) { return $null }
643643

644-
$urls = @(url $manifest $arch)
644+
$urls = @(script:url $manifest $arch)
645645

646646
$index = [array]::indexof($urls, $url)
647647
if($index -eq -1) { abort "Couldn't find hash in manifest for '$url'." }

0 commit comments

Comments
 (0)