Skip to content

Commit

Permalink
Fix binary
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Mar 9, 2024
1 parent cffc30e commit bb60b19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/ethernaut-cli/ethernaut
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ execDir=$(pwd)
fileDir=$(dirname $0)
cd $fileDir

# Check if hardhat.config.js exists in the current directory
if [ ! -f hardhat.config.js ]; then
# If not, change directory to the global npm package location
cd ../lib/node_modules/ethernaut-cli
fi

# Check if --version is in argv
for arg in "$@"
do
Expand All @@ -14,11 +20,5 @@ do
fi
done

# Check if hardhat.config.js exists in the current directory
if [ ! -f hardhat.config.js ]; then
# If not, change directory to the global npm package location
cd ../lib/node_modules/ethernaut-cli
fi

/usr/bin/env npx hardhat "$@"
cd $execDir

0 comments on commit bb60b19

Please sign in to comment.