Skip to content

Commit

Permalink
fixup! resolve e2e build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 31, 2023
1 parent f00dec9 commit 926effa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion e2e/start-companion-with-load-balancer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { spawn } from 'node:child_process'
import http from 'node:http'
import httpProxy from 'http-proxy'
import process from 'node:process'

const numInstances = 3
const lbPort = 3020
Expand Down Expand Up @@ -45,9 +46,12 @@ function createLoadBalancer (baseUrls) {
return server
}

const isWindows = process.platform === 'win32'
const isOSX = process.platform === 'darwin'

const startCompanion = ({ name, port }) => {
const cp = spawn(process.execPath, [
'--watch-path', 'packages/@uppy/companion/src', '-r', 'dotenv/config', '--watch', './packages/@uppy/companion/src/standalone/start-server.js',
'-r', 'dotenv/config', ...(isWindows || isOSX ? ['--watch-path', 'packages/@uppy/companion/src', '--watch'] : []), './packages/@uppy/companion/src/standalone/start-server.js',
], {
cwd: new URL('../', import.meta.url),
stdio: 'inherit',
Expand Down

0 comments on commit 926effa

Please sign in to comment.