Skip to content

Commit

Permalink
use relative path for polkadot-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pgherveou committed Nov 26, 2024
1 parent c164368 commit 434b2d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions substrate/frame/revive/rpc/examples/js/src/geth-diff-setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { spawn, spawnSync, Subprocess } from 'bun'
import { join } from 'path'
import { join, resolve } from 'path'
import { readFileSync } from 'fs'
import { createWalletClient, defineChain, Hex, http, publicActions } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
Expand Down Expand Up @@ -109,6 +109,7 @@ export function waitForHealth(url: string) {
}

export const procs: Subprocess[] = []
const polkadotSdkPath = resolve(__dirname, '../../../../../../..')
if (!process.env.USE_LIVE_SERVERS) {
procs.push(
// Run geth on port 8546
Expand All @@ -134,7 +135,7 @@ if (!process.env.USE_LIVE_SERVERS) {
{
stdout: Bun.file('/tmp/kitchensink.out.log'),
stderr: Bun.file('/tmp/kitchensink.err.log'),
cwd: join(process.env.HOME!, 'polkadot-sdk'),
cwd: polkadotSdkPath,
}
)
})(),
Expand All @@ -151,7 +152,7 @@ if (!process.env.USE_LIVE_SERVERS) {
{
stdout: Bun.file('/tmp/eth-rpc.out.log'),
stderr: Bun.file('/tmp/eth-rpc.err.log'),
cwd: join(process.env.HOME!, 'polkadot-sdk'),
cwd: polkadotSdkPath,
}
)
await waitForHealth('http://localhost:8545/health').catch()
Expand Down

0 comments on commit 434b2d1

Please sign in to comment.