You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used forge test with my new PC, then here comes an error.
2023-08-14T17:01:18.492771Z ERROR apply:ext: evm::cheatcodes: non-empty stderr args=["./lib/foundry-huff/scripts/binary_check.sh"] stderr="./lib/foundry-huff/scripts/binary_check.sh: line 3: npm: command not found\n"
2023-08-14T17:01:18.492906Z ERROR forge::runner: setUp failed reason="Invalid huffc binary. Run `curl -L get.huff.sh | bash` and `huffup` to fix."
Running 1 test for test/Sando.t.sol:SandoTest
[FAIL. Reason: Setup failed: Invalid huffc binary. Run `curl -L get.huff.sh | bash` and `huffup` to fix.] setUp() (gas: 0)
Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 30.71ms
Ran 2 test suites: 3 tests passed, 1 failed, 0 skipped (4 total tests)
It was really weird since I have my huff-rs installed already.
So, I checked binary_check.sh file and got the answer.
#! /bin/bash
if ! [[ "$(npm list -g huffc)" =~ "empty" ]]; then
# huffc was installed via npm, return 0x00
echo -n 0x00
elif [[ "$(yarn global list)" =~ "huffc" ]]; then
# huffc was installed via yarn, return 0x00
echo -n 0x00
else
echo -n 0x01
fi
I have not installed npm before on this computer,
so I managed to install npm via sudo apt install npm and then retried.
The result was successful.
although forge emitted one error for not being installed yarn, the compiler ran successful and the test was great.
2023-08-14T17:06:43.712365Z ERROR apply:ext: evm::cheatcodes: non-empty stderr args=["./lib/foundry-huff/scripts/binary_check.sh"] stderr="./lib/foundry-huff/scripts/binary_check.sh: line 6: yarn: command not found\n"
So I think that there should be a fix on the file "binary_check.sh" for those do not have npm nor yarn installed on their computer. thanks!
The text was updated successfully, but these errors were encountered:
I used forge test with my new PC, then here comes an error.
It was really weird since I have my huff-rs installed already.
So, I checked binary_check.sh file and got the answer.
I have not installed npm before on this computer,
so I managed to install npm via sudo apt install npm and then retried.
The result was successful.
although forge emitted one error for not being installed yarn, the compiler ran successful and the test was great.
So I think that there should be a fix on the file "binary_check.sh" for those do not have npm nor yarn installed on their computer. thanks!
The text was updated successfully, but these errors were encountered: