aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/asar-helpers.ts
blob: 3da90625d076db19c1f3a2eb539e1ca5339ca98c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { join } from 'path';

export function asarPath(dir: string = '') {
  return dir.replace('app.asar', 'app.asar.unpacked');
}

// Replacing app.asar is not beautiful but unfortunately necessary
export function asarRecipesPath(...segments: any[]) {
  return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat());
}