Skip to content

Commit 55efd50

Browse files
authored
Merge pull request #337 from drift-labs/wphan/fix_process_paths
fix esbuild mangled paths in subprocesses
2 parents 7a7260e + a6e9163 commit 55efd50

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

src/experimental-bots/filler/fillerMultithreaded.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,12 @@ export class FillerMultithreaded {
482482
const dlobBuilderFileName =
483483
'dlobBuilder' + (isTsRuntime() ? '.ts' : '.js');
484484
const dlobBuilderProcess = spawnChild(
485-
path.join(__dirname, '../filler-common', dlobBuilderFileName),
485+
path.join(
486+
__dirname,
487+
isTsRuntime() ? '..' : '.',
488+
'filler-common',
489+
dlobBuilderFileName
490+
),
486491
dlobBuilderArgs,
487492
'dlobBuilder',
488493
(msg: any) => {
@@ -576,7 +581,12 @@ export class FillerMultithreaded {
576581
const orderSubscriberFileName =
577582
'orderSubscriberFiltered' + (isTsRuntime() ? '.ts' : '.js');
578583
const orderSubscriberProcess = spawnChild(
579-
path.join(__dirname, '../filler-common', orderSubscriberFileName),
584+
path.join(
585+
__dirname,
586+
isTsRuntime() ? '..' : '.',
587+
'filler-common',
588+
orderSubscriberFileName
589+
),
580590
orderSubscriberArgs,
581591
'orderSubscriber',
582592
(msg: any) => {
@@ -606,7 +616,12 @@ export class FillerMultithreaded {
606616
const swiftOrderSubscriberFileName =
607617
'swiftOrderSubscriber' + (isTsRuntime() ? '.ts' : '.js');
608618
const swiftOrderSubscriberProcess = spawnChild(
609-
path.join(__dirname, '../filler-common', swiftOrderSubscriberFileName),
619+
path.join(
620+
__dirname,
621+
isTsRuntime() ? '..' : '.',
622+
'filler-common',
623+
swiftOrderSubscriberFileName
624+
),
610625
orderSubscriberArgs,
611626
'swiftOrderSubscriber',
612627
(msg: any) => {

src/experimental-bots/spotFiller/spotFillerMultithreaded.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,12 @@ export class SpotFillerMultithreaded {
463463
const dlobBuilderFileName =
464464
'dlobBuilder' + (isTsRuntime() ? '.ts' : '.js');
465465
const dlobBuilderProcess = spawnChild(
466-
path.join(__dirname, './filler-common', dlobBuilderFileName),
466+
path.join(
467+
__dirname,
468+
isTsRuntime() ? '..' : '.',
469+
'filler-common',
470+
dlobBuilderFileName
471+
),
467472
dlobBuilderArgs,
468473
'dlobBuilder',
469474
(msg: any) => {
@@ -557,7 +562,12 @@ export class SpotFillerMultithreaded {
557562
const orderSubscriberFileName =
558563
'orderSubscriberFiltered' + (isTsRuntime() ? '.ts' : '.js');
559564
const orderSubscriberProcess = spawnChild(
560-
path.join(__dirname, './filler-common', orderSubscriberFileName),
565+
path.join(
566+
__dirname,
567+
isTsRuntime() ? '..' : '.',
568+
'filler-common',
569+
orderSubscriberFileName
570+
),
561571
orderSubscriberArgs,
562572
'orderSubscriber',
563573
(msg: any) => {

0 commit comments

Comments
 (0)