From 8bf5296fe6f0fd8679c6ed971749cb1f9b1b4034 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 15 Aug 2023 18:00:43 +0200 Subject: [PATCH] Gracefully handle error linking mods on Windows --- packages/host/src/Instance.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/host/src/Instance.js b/packages/host/src/Instance.js index 132873fc..add7aceb 100644 --- a/packages/host/src/Instance.js +++ b/packages/host/src/Instance.js @@ -662,7 +662,11 @@ rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " "); // not something we want to have. For this reason the mods // are hard linked instead. } else { - await fs.link(target, link); + try { + await fs.link(target, link); + } catch (err) { + this.logger.warn(`Failed to link mod ${modFile}.`); + } } }