Files
trezor-suite/packages/request-manager/e2e/torRunner.ts

16 lines
516 B
TypeScript

import { spawn } from 'child_process';
import path from 'path';
const customTorProcessDir = process.env.TOR_BINARY_PATH;
const processDir = path.join(__dirname, './../../suite-data/files/bin/tor/linux-x64/');
const processPath = customTorProcessDir || path.join(processDir, 'tor');
export const torRunner = ({ torParams = [] }: { torParams: string[] }) => {
const process = spawn(processPath, torParams, {
cwd: processDir,
stdio: ['ignore', 'ignore', 'ignore'],
});
return process;
};