Skip to content

Commit

Permalink
fix: fix npm_install script if there is no package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
vivianjeng committed Apr 5, 2024
1 parent 8ecd670 commit e77cb17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/cli/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ read_toml() {

# Install npm dependencies
npm_install() {
if [[ ! -d "${CIRCUIT_DIR}/node_modules" ]]; then
if [[ -f "${CIRCUIT_DIR}/package.json" && ! -d "${CIRCUIT_DIR}/node_modules" ]]; then
echo "Installing npm dependencies for $CIRCUIT_DIR..."
(cd $CIRCUIT_DIR && npm install)
fi
Expand Down

0 comments on commit e77cb17

Please sign in to comment.