diff --git a/scripts/lib/upgrade-zulip-stage-2 b/scripts/lib/upgrade-zulip-stage-2 index cb33b222f1..0039ef8be7 100755 --- a/scripts/lib/upgrade-zulip-stage-2 +++ b/scripts/lib/upgrade-zulip-stage-2 @@ -215,7 +215,15 @@ elif args.from_git: # update-prod-static with the Git upgrade process. But it'll fail # safely; this seems like a worthwhile tradeoff to minimize downtime. logging.info("Building static assets...") - subprocess.check_call(["./tools/update-prod-static"], preexec_fn=su_to_zulip) + try: + subprocess.check_call(["./tools/update-prod-static"], preexec_fn=su_to_zulip) + except subprocess.CalledProcessError: + logging.error("Failed to build static assets.") + if IS_SERVER_UP: + logging.error("Usually the cause is insufficient free RAM to run webpack.") + logging.error("Try stopping the Zulip server (scripts/stop-server) and trying again.") + sys.exit(1) + logging.info("Caching Zulip Git version...") subprocess.check_call(["./tools/cache-zulip-git-version"], preexec_fn=su_to_zulip) else: