summaryrefslogtreecommitdiffstats
path: root/src/helpers
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-01 20:42:54 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2021-10-01 21:13:19 +0530
commit11f99ffaac3529b1ef61fa5360923a78ee7ce7d5 (patch)
tree00431d7bec188df401d30ee71daab8eb06456dcf /src/helpers
parentfix: fix repo name in dev app update config (diff)
downloadferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.tar.gz
ferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.tar.zst
ferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.zip
refactor: move 'asarRecipesPath' into 'asar-helpers'
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/asar-helpers.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/helpers/asar-helpers.ts b/src/helpers/asar-helpers.ts
index 3d9f0d941..3da90625d 100644
--- a/src/helpers/asar-helpers.ts
+++ b/src/helpers/asar-helpers.ts
@@ -1,3 +1,10 @@
1import { join } from 'path';
2
1export function asarPath(dir: string = '') { 3export function asarPath(dir: string = '') {
2 return dir.replace('app.asar', 'app.asar.unpacked'); 4 return dir.replace('app.asar', 'app.asar.unpacked');
3} 5}
6
7// Replacing app.asar is not beautiful but unfortunately necessary
8export function asarRecipesPath(...segments: any[]) {
9 return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat());
10}