Open walliski opened 4 years ago
I'm currently having the same issue. Any idea @renevanosnabrugge or @jessehouwing ?
After some digging it seems the option --force-local
isn't even supported on Windows? When I try it in Windows Terminal with PowerShell I get the same message.
On Ubuntu 20.04 it's accepted.
So I tried to change the agent to Ubuntu20.04 for my release but then I get the message
##[error]The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
Looks like it's only when you're using the package for name and version metadata. Flipping to name and version manually specified worked for me.
I just put a pwsh task before to pull the version from the package.json file:
- pwsh: |
echo "##vso[task.setvariable variable=PackageVersion]$((gc ./package.json | ConvertFrom-Json).version)"
Then plugged it in like:
- task: rvo-vsts-promotepackage-task@3
condition: and(succeeded(), eq(variables.isMain, true))
inputs:
feed: 'xxx'
inputType: nameVersion
definition: '@my-baller-company/the-internet-is-in-this-package'
version: '$(PackageVersion)'
releaseView: 'xxx'
This appears to also happen to me because I am using the .snupkg
symbol package format and it's specifically looking for .nupkg
. Works fine with the old .symbols.nupkg
format.
function Get-PackageMetadata([string]$filePath) {
$extension = [System.IO.Path]::GetExtension($filePath)
if ($extension -eq '.nupkg') {
return Get-NuGetPackageMetadata $filePath
} else { # ($extension -eq '.tgz')
return Get-NpmPackageMetadata $filePath
}
}
Currently running on "windows-latest" label for my build, and trying to promote a package that I have just packed with "npm pack". Getting the following error during promotion:
tar.exe: Option --force-local is not supported
Related to #41 perhaps, where another user mentioned the same issue.
Full output: