Browse Source

build: make check-symlinks.js aware of BRANDING.json changes (#35669)

Right now the `check-symlinks.js` assumes that the branding product name
is "Electron". If users change `BRANDING.json` on custom builds, the
script will fail.

Signed-off-by: Juan Cruz Viotti <[email protected]>

Signed-off-by: Juan Cruz Viotti <[email protected]>
Co-authored-by: Juan Cruz Viotti <[email protected]>
trop[bot] 2 years ago
parent
commit
c5e920e361
1 changed files with 2 additions and 1 deletions
  1. 2 1
      script/check-symlinks.js

+ 2 - 1
script/check-symlinks.js

@@ -2,13 +2,14 @@ const fs = require('fs');
 const path = require('path');
 
 const utils = require('./lib/utils');
+const branding = require('../shell/app/BRANDING.json');
 
 if (process.platform !== 'darwin') {
   console.log('Not checking symlinks on non-darwin platform');
   process.exit(0);
 }
 
-const appPath = path.resolve(__dirname, '..', '..', 'out', utils.getOutDir(), 'Electron.app');
+const appPath = path.resolve(__dirname, '..', '..', 'out', utils.getOutDir(), `${branding.product_name}.app`);
 const visited = new Set();
 const traverse = (p) => {
   if (visited.has(p)) return;