HaaLeo / publish-vscode-extension

GitHub action to publish your VS Code Extension to the Open VSX Registry or Visual Studio Marketplace.
MIT License
209 stars 13 forks source link

Packaging fails on "invalid relative path" #45

Closed DvvCz closed 6 months ago

DvvCz commented 1 year ago
publish-vscode-extension Version Operating System
v1 ubuntu-latest

Description

Action fails on packaging my extension because of my editorconfig file? The invalid relative path it gives me in the error is referenced nowhere in my project. It's just a .editorconfig file at the top level of my monorepo. I've tried duplicating the .editorconfig file and putting it inside of the folder to be uploaded, but didn't do anything. Then I assumed it was because I had no vscodeignore file, seems that didn't do anything either.

Expected Behavior

Should not error

Actual Behavior

Errors on "invalid relative path" due to editorconfig (see context)

Steps to Reproduce

  1. Monorepo with packages/xyz-vscode
  2. Have .editorconfig at top level
  3. Try and package ./packages/xyz-vscode to OpenVSX

Context



Error: invalid relative path: extension/../../.editorconfig
    at validateMetadataPath (/home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:109295:59)
    at ZipFile.addFile (/home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:108951:18)
    at /home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:4806:19
    at Array.forEach ()
    at /home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:4802:15
    at new Promise ()
    at /home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:4800:21
    at async pack (/home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:4870:5)
    at async packageCommand (/home/runner/work/_actions/HaaLeo/publish-vscode-extension/v1/dist/index.js:4880:36)

YMC-GitHub commented 6 months ago

I meet this.

YMC-GitHub commented 6 months ago

@DvvCz do you have an anwser ?

DvvCz commented 6 months ago

Unfortunately not. This is the last run I had with the extension: https://github.com/DvvCz/ramattra/actions/runs/6021530472

AFAIK I just left it alone to work on other parts of the project

YMC-GitHub commented 6 months ago

@DvvCz i found a anwser in here. https://github.com/Microsoft/vscode-vsce/issues/300 eg :vsce package --yarn

HaaLeo commented 6 months ago

I guess with that reference we can consider this as fixed or more to be an upstream problem. Thx @YMC-GitHub for digging into this.