Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(checkver): URL ping equality with dl function #188

Merged
merged 4 commits into from
Aug 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
debug
  • Loading branch information
Ash258 committed Aug 8, 2021
commit d6b6b9bc3d41fd547c88d692f0e5bb99d1d57167
2 changes: 2 additions & 0 deletions lib/manifest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ function New-VersionedManifest {
$newManifest = Invoke-Autoupdate $Path.Basename $null $manifest $Version $(${ }) $Path.Extension -IgnoreArchive
if ($null -eq $newManifest) { throw 'trigger' }
} catch {
Write-Host $_.Exception.InnerException.Message -f magenta
Write-Host $_.Exception.Message -f magenta
throw [ScoopException] "Cannot generate manifest with version '$Version'"
}

Expand Down
3 changes: 2 additions & 1 deletion test/Shovel-Manifest.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Describe 'Manifests operations' -Tag 'Scoop' {

It 'New-VersionedManifest' {
$path = manifest_path 'pwsh' 'ash258.ash258'
Write-Host -f magenta $SHOVEL_USERAGENT
$new = New-VersionedManifest -LiteralPath $path -Version '7.1.0' 6>$null
$new | Should -BeLike "$env:SCOOP\manifests\pwsh-*.json"
(ConvertFrom-Manifest -LiteralPath $new).version | Should -Be '7.1.0'
Expand Down Expand Up @@ -126,7 +127,7 @@ Describe 'Manifests operations' -Tag 'Scoop' {

It 'Error handling' {
{ manifest_path 'invalid_wget' 'main' | Resolve-ManifestInformation } | Should -Throw 'Not a valid manifest'
( { manifest_path 'broken_wget' 'main' | Resolve-ManifestInformation } | Should -Throw -Passthru).Exception.Message | Should -BeLike 'File is not a valid manifest*'
( { manifest_path 'broken_wget' 'main' | Resolve-ManifestInformation } | Should -Throw -PassThru).Exception.Message | Should -BeLike 'File is not a valid manifest*'
}
}

Expand Down