Skip to content

Commit

Permalink
fix: forc bin path on typegen test utility (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf authored Feb 9, 2023
1 parent dcdfea0 commit 1f79f79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changeset/three-dolphins-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
6 changes: 4 additions & 2 deletions packages/abi-typegen/test/utils/sway/createTempSwayProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { execSync } from 'child_process';
import { copyFileSync, writeFileSync } from 'fs';
import mkdirp from 'mkdirp';
import os from 'os';
import { basename, join } from 'path';
import { basename, join, resolve } from 'path';
import rimraf from 'rimraf';

import { normalizeName } from '../../../src/utils/normalize';
Expand Down Expand Up @@ -56,8 +56,10 @@ export function createTempSwayProject(params: ISwayParams) {

if (autoBuild === true) {
// run forc build inside of it
const forcPath = join(__dirname, '..', '..', '..', '..', 'forc-bin', 'forc-binaries', 'forc');
const absoluteForcPath = resolve(forcPath);
try {
execSync(`pnpm exec forc build`, {
execSync(`${absoluteForcPath} build`, {
cwd: tempDir,
stdio: 'pipe',
encoding: 'utf-8',
Expand Down

0 comments on commit 1f79f79

Please sign in to comment.