diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 4856079f68a..06e5c1185d1 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -269,8 +269,8 @@ function serverPath(config: Config): string | null { async function isNixOs(): Promise { try { const contents = (await vscode.workspace.fs.readFile(vscode.Uri.file("/etc/os-release"))).toString(); - const idString = contents.split('\n').find((a) => a.startsWith("ID=")); - return idString?.toLowerCase()?.indexOf("nixos") !== -1; + const idString = contents.split('\n').find((a) => a.startsWith("ID=")) || "ID=linux"; + return idString.indexOf("nixos") !== -1; } catch { return false; }