diff options
author | 2021-10-01 20:42:54 +0530 | |
---|---|---|
committer | 2021-10-01 21:13:19 +0530 | |
commit | 11f99ffaac3529b1ef61fa5360923a78ee7ce7d5 (patch) | |
tree | 00431d7bec188df401d30ee71daab8eb06456dcf /src/helpers/asar-helpers.ts | |
parent | fix: fix repo name in dev app update config (diff) | |
download | ferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.tar.gz ferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.tar.zst ferdium-app-11f99ffaac3529b1ef61fa5360923a78ee7ce7d5.zip |
refactor: move 'asarRecipesPath' into 'asar-helpers'
Diffstat (limited to 'src/helpers/asar-helpers.ts')
-rw-r--r-- | src/helpers/asar-helpers.ts | 7 |
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 @@ | |||
1 | import { join } from 'path'; | ||
2 | |||
1 | export function asarPath(dir: string = '') { | 3 | export 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 | ||
8 | export function asarRecipesPath(...segments: any[]) { | ||
9 | return join(asarPath(join(__dirname, '..', 'recipes')), ...[segments].flat()); | ||
10 | } | ||