Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

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

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants