Skip to content

fix(code-server): handle when the extension folder does not exist yet #278

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

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

michaelbrewer
Copy link
Contributor

Preemptively create specified extension folder in case the parent folder is missing.

So for example is /home/local/.ws was not created yet and the extension path is /home/local/.ws/extensions then code server will have the following error.

Error: ENOENT: no such file or directory, mkdir '/home/local/.ws/extensions'
    at Object.mkdirSync (node:fs:1380:26)
    at /home/local/.code-server/lib/code-server-4.91.1/lib/vscode/out/vs/server/node/server.main.js:221:1910
    at Array.forEach ()
    at h (/home/local/.code-server/lib/code-server-4.91.1/lib/vscode/out/vs/server/node/server.main.js:221:1875)
    at m (/home/local/.code-server/lib/code-server-4.91.1/lib/vscode/out/vs/server/node/server.main.js:221:2001)
    at /home/local/.code-server/lib/code-server-4.91.1/out/node/main.js:42:15
    at Generator.next ()
    at fulfilled (/home/local/.code-server/lib/code-server-4.91.1/out/node/main.js:5:58) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: '/home/local/.ws/extensions'
}

@matifali matifali merged commit 4c45d69 into coder:main Aug 14, 2024
2 checks passed
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 this pull request may close these issues.

2 participants