'how to write a logic in shell script to fail a server when a condition is not met

node@^10.51.0; 7pm install; nom run build; rm -rf /usr/share/nginx/html/* cp -R /tmp/{{ appName }}/dist/{{ genericTc}}/* /usr/share/nginx/html;

I want to add logic to fail the server when npm build fails.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source