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

throw ENOENT on disabled vscode extensions #4

Closed
Asim-Tahir opened this issue Oct 17, 2022 · 2 comments · Fixed by #5
Closed

throw ENOENT on disabled vscode extensions #4

Asim-Tahir opened this issue Oct 17, 2022 · 2 comments · Fixed by #5

Comments

@Asim-Tahir
Copy link

Asim-Tahir commented Oct 17, 2022

Encountered 😔

It gives ENOENT error on disabled VSCode extensions. When I remove the disabled extension, it switches to the next disabled extension and gives the same ENOENT error.

Expectation 💭

I expect to bypass disabled extensions and not get any error.

Traceback

$ npx @campvanilla/ditto-cli
Something went wrong! [Error: ENOENT: no such file or directory, open '$HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.10/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '$HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.10/package.json'
}
$ npx envinfo --system --IDEs

  System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
    Memory: 376.61 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  IDEs:
    VSCode: 1.72.2 - /usr/local/bin/code
@rheaditi
Copy link
Member

rheaditi commented Nov 11, 2022

Hi @Asim-Tahir

I wasn't really able to reproduce this. I have the same extension installed & globally disabled, but it does not lead to an error.
image

And the file exists within the vscode extensions directory (VSCode: 1.73.1 // arm64):

❯ ls -l $HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.11/package.json
-rw-r--r--  1 <user> <group>  6916 Nov 11 19:36 $HOME/.vscode/extensions/apollographql.vscode-apollo-1.19.11/package.json

This only led to an error if I manually moved the file.


Regardless, we can add a check to not throw in case the file doesn't exist.

@Asim-Tahir
Copy link
Author

Thats works, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants