mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
20 lines
826 B
Diff
20 lines
826 B
Diff
diff --git a/src/worker/node/defaultOptions.js b/src/worker/node/defaultOptions.js
|
|
index 053c1e3e3b561b2e5b5e3609e9c6b509b1661f11..407242f5576f8d888644ab28ff169599a79bf4dd 100644
|
|
--- a/src/worker/node/defaultOptions.js
|
|
+++ b/src/worker/node/defaultOptions.js
|
|
@@ -1,10 +1,13 @@
|
|
const path = require('path');
|
|
+const fs = require('fs');
|
|
const defaultOptions = require('../../constants/defaultOptions');
|
|
|
|
+const defaultPath = path.join(import.meta.dir, '..', '..', 'worker-script', 'node', 'index.js')
|
|
+
|
|
/*
|
|
* Default options for node worker
|
|
*/
|
|
module.exports = {
|
|
...defaultOptions,
|
|
- workerPath: path.join(__dirname, '..', '..', 'worker-script', 'node', 'index.js'),
|
|
+ workerPath: fs.existsSync(defaultPath) ? defaultPath : path.join(import.meta.dir, 'tesseract.js', 'src', 'worker-script', 'node', 'index.js'),
|
|
};
|