skip to Main Content

Can anyone explain this command?

CMD [ -d "node_modules" ] && npm run start || npm ci && npm run start

2

Answers


  1. If a directory named node_modules exists, then run npm run start. Else run npm ci and then npm run start.

    The objective is to only run npm ci if node_modules doesn’t exist.

    Login or Signup to reply.
  2. Basically -d tests for directory existence and runs npm run start, otherwise it will run npm ci && npm run start

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search