Skip to content

Commit

Permalink
build: make check-symlinks.js aware of BRANDING.json changes (#35669)
Browse files Browse the repository at this point in the history
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 <jv@jviotti.com>

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Co-authored-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
trop[bot] and jviotti committed Sep 15, 2022
1 parent cb08a46 commit c5e920e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/check-symlinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c5e920e

Please sign in to comment.