mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
feat(cli): add test for readSocketPath (#4284)
* fix: update isNodeJSErrnoException * refactor(cli): export and purify readSocketPath * feat: add tests for readSocketPath * fix(ci): temporarily disable install deps from cache
This commit is contained in:
@@ -490,7 +490,7 @@ export function escapeHtml(unsafe: string): string {
|
||||
* it has a .code property.
|
||||
*/
|
||||
export function isNodeJSErrnoException(error: unknown): error is NodeJS.ErrnoException {
|
||||
return error instanceof Error && (error as NodeJS.ErrnoException).code !== undefined
|
||||
return error !== undefined && (error as NodeJS.ErrnoException).code !== undefined
|
||||
}
|
||||
|
||||
// TODO: Replace with proper templating system.
|
||||
|
||||
Reference in New Issue
Block a user