diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 191960960a..4eaaed62bd 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -340,7 +340,7 @@ async function getServer(config: Config, state: PersistentState): Promise true).catch(_ => false)) { + if (await isNixOs()) { await patchelf(dest); } @@ -348,6 +348,15 @@ async function getServer(config: Config, state: PersistentState): Promise { + try { + const contents = await fs.readFile("/etc/os-release"); + return contents.indexOf("ID=nixos") !== -1; + } catch (e) { + return false; + } +} + async function downloadWithRetryDialog(state: PersistentState, downloadFunc: () => Promise): Promise { while (true) { try {