Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@
- **depends:** Prevent error on no URL ([#4595](https://github.com/ScoopInstaller/Scoop/issues/4595))
- **decompress:** Fix nested Zstd archive extraction ([#4608](https://github.com/ScoopInstaller/Scoop/issues/4608))

### Documentation

- **changelog:** Add 'CHANGLOG.md' ([#4600](https://github.com/ScoopInstaller/Scoop/issues/4600))

### Styles

- **test:** Format scripts by VSCode's PowerShell extension ([#4609](https://github.com/ScoopInstaller/Scoop/issues/4609))

### Tests

- **test-bin:** Only write output file in CI and fix trailing whitespaces ([#4613](https://github.com/ScoopInstaller/Scoop/issues/4613))

### Documentation

- **changelog:** Add 'CHANGLOG.md' ([#4600](https://github.com/ScoopInstaller/Scoop/issues/4600))

<a name="2021-12-26"></a>
## [2021-12-26]

Expand Down
6 changes: 3 additions & 3 deletions libexec/scoop-prefix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Summary: Returns the path to the specified app
param($app)

if(!$app) {
if (!$app) {
. "$psscriptroot\..\lib\help.ps1"
my_usage
exit 1
Expand All @@ -11,11 +11,11 @@ if(!$app) {
. "$psscriptroot\..\lib\core.ps1"

$app_path = versiondir $app 'current' $false
if(!(Test-Path $app_path)) {
if (!(Test-Path $app_path)) {
$app_path = versiondir $app 'current' $true
}

if(Test-Path $app_path) {
if (Test-Path $app_path) {
Write-Output $app_path
} else {
abort "Could not find app path for '$app'."
Expand Down
3 changes: 0 additions & 3 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,6 @@
},
"persist": {
"$ref": "#/definitions/stringOrArrayOfStringsOrAnArrayOfArrayOfStrings"
},
"license": {
"$ref": "#/definitions/license"
},
"license": {
"$ref": "#/definitions/license"
Expand Down
17 changes: 11 additions & 6 deletions test/bin/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ param(
[String] $TestPath = 'test/'
)

$resultsXml = "$PSScriptRoot/TestResults.xml"
$excludes = @()

$splat = @{
Path = $TestPath
OutputFile = $resultsXml
OutputFormat = 'NUnitXML'
PassThru = $true
}

if ($env:CI -eq $true) {
$resultsXml = "$PSScriptRoot/TestResults.xml"
$excludes = @()

$splat += @{
OutputFile = $resultsXml
OutputFormat = 'NUnitXML'
}

$commit = if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) { $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT } else { $env:APPVEYOR_REPO_COMMIT }
$commitMessage = "$env:APPVEYOR_REPO_COMMIT_MESSAGE $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED".TrimEnd()

Expand Down Expand Up @@ -62,7 +65,9 @@ if ($env:CI -eq $true) {
Write-Host 'Invoke-Pester' @splat
$result = Invoke-Pester @splat

(New-Object Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $resultsXml)
if ($env:CI -eq $true) {
(New-Object Net.WebClient).UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $resultsXml)
}

if ($result.FailedCount -gt 0) {
exit $result.FailedCount
Expand Down