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

vscode extension downloaded with @theia/cli script: files lose exec permission #8306

Closed
marcdumais-work opened this issue Aug 4, 2020 · 0 comments · Fixed by #8315
Closed
Labels
bug bugs found in the application theia-cli issues related to the theia-cli

Comments

@marcdumais-work
Copy link
Contributor

Bug Description:

e.g. VS Code extensions defined in the repo's main package.json are downloaded at build time using @theia/cli -provided download-plugins.ts. That script uses npm unzip-stream to unzip the .vsix. That library does not support restoring filesystem premissions.

In consequence, vscode extensions that rely on e.g. execute permission on some of the contained files will not work correctly. It's the case for the yangster extension, that has a language server startup script that does not work without this permission ( server/bin/yang-language-server).

Steps to Reproduce:

  1. Add the yangster extension to root package.json, under theiaPluginsDir:
    "yangster": "https://open-vsx.org/api/typefox/yang-vscode/2.0.3/file/typefox.yang-vscode-2.0.3.vsix"
  2. Build example application: e.g yarn or if already build do yarn download:plugins
  3. Look under the extensions' folder like so: ls -al plugins/yangster/extension/server/bin/ and confirm that file yang-language-server does not have execute permission.
  4. Start the example application and open a .yangster file. Confirm that the LS does not start - there should be a toaster about this and an entry in the Output view:
    image
    image
  5. reset the theia repo to a clean master state and rebuild the example application. This time install yangster from the extensions view. It will be unzipped by the Plugins system which works correctly.
  6. confirm that the LS has exec permission. e.g.: ls -al ~/.theia/extensions/typefox.yang-vscode-2.0.3/extension/server/bin/ and confirm the LS has execute permission
    7 If you'd like, start the example app and open a .yang file to confirm that the LS now works

Additional Information

Someone suggests using extract-zip instead to fix the issue.

  • Operating System: all
  • Theia Version: master
@marcdumais-work marcdumais-work added bug bugs found in the application theia-cli issues related to the theia-cli labels Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application theia-cli issues related to the theia-cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant