From 31aff8a43a62e57af35fc174039b92e1e1e04195 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 28 Apr 2025 20:24:01 +0300 Subject: [PATCH] chore(nx/forge): try to use real path for signing --- apps/desktop/electron-forge/sign-windows.cjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/desktop/electron-forge/sign-windows.cjs b/apps/desktop/electron-forge/sign-windows.cjs index 3d7063ff8..8bd989700 100644 --- a/apps/desktop/electron-forge/sign-windows.cjs +++ b/apps/desktop/electron-forge/sign-windows.cjs @@ -1,17 +1,18 @@ const child_process = require("child_process"); const fs = require("fs"); +const { default: path } = require("path"); module.exports = function (filePath) { const { WINDOWS_SIGN_EXECUTABLE } = process.env; - const stats = fs.lstatSync(filePath); - console.log(filePath, stats); - if (!WINDOWS_SIGN_EXECUTABLE) { console.warn("[Sign] Skip signing due to missing environment variable."); return; } + console.log(filePath, fs.realpathSync(filePath)); + filePath = fs.realpathSync(filePath); + const command = `${WINDOWS_SIGN_EXECUTABLE} --executable "${filePath}"`; console.log(`[Sign] ${command}`);