From b281d78af04d73101205b562c7376ced77b31706 Mon Sep 17 00:00:00 2001 From: David First Date: Thu, 30 May 2024 14:08:38 -0400 Subject: [PATCH] chore, fix establish-dev-link-windows to throw on non-ENOENT --- scripts/establish-dev-link-windows.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/establish-dev-link-windows.js b/scripts/establish-dev-link-windows.js index 29fdb716f382..a0e12a141693 100644 --- a/scripts/establish-dev-link-windows.js +++ b/scripts/establish-dev-link-windows.js @@ -10,7 +10,11 @@ const dest = `${process.env.localappdata}\\${linkName}`; try { rmSync(dest, { recursive: true }); -} catch (err) {} // maybe doesn't exist +} catch (err) { + if (err.code !== 'ENOENT') { + throw err; // it can be a permissions error for example. we want to know about it. + } +} try { unlinkSync(dest);