From 2c7b50217ee864a5a529af38aae8ccf14ab60888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Sat, 2 Oct 2021 10:05:39 +0300 Subject: [PATCH] Overwrite file when running patchelf --- editors/code/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index da04eec92b1..72eca0fcc21 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -286,7 +286,7 @@ async function patchelf(dest: vscode.Uri): Promise { } `; const origFile = vscode.Uri.file(dest.fsPath + "-orig"); - await vscode.workspace.fs.rename(dest, origFile); + await vscode.workspace.fs.rename(dest, origFile, { overwrite: true }); progress.report({ message: "Patching executable", increment: 20 }); await new Promise((resolve, reject) => { const handle = exec(`nix-build -E - --argstr srcStr '${origFile.fsPath}' -o '${dest.fsPath}'`,