Skip to content

Commit

Permalink
fix(runtime): fix override deps when init package.json (labring#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal authored Feb 18, 2024
1 parent c40d018 commit d73d71b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions runtimes/nodejs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ ln -s $CUSTOM_DEPENDENCY_BASE_PATH/node_modules $PWD/functions/node_modules > /d
# generate package.json
(
cd $CUSTOM_DEPENDENCY_BASE_PATH
echo '{}' > package.json
npm install $NPM_INSTALL_FLAGS > /dev/null 2>&1
npm install $DEPENDENCIES $NPM_INSTALL_FLAGS > /dev/null 2>&1
)

# source .env
Expand Down
2 changes: 1 addition & 1 deletion runtimes/nodejs/upload-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ -n "$NODE_MODULES_PUSH_URL" ]; then
echo "Failed to upload node_modules cache."
else
end_time_2=$(date +%s)
elapsed_time_2=$(expr $end_time_2 - $end_time)
elapsed_time_2=$(expr $end_time_2 - $end_time_1)
echo "Uploaded node_modules.tar in $elapsed_time_2 seconds."
fi

Expand Down

0 comments on commit d73d71b

Please sign in to comment.