mik-laj commented on a change in pull request #20238:
URL: https://github.com/apache/airflow/pull/20238#discussion_r775207313



##########
File path: scripts/docker/compile_www_assets.sh
##########
@@ -35,8 +34,26 @@ function compile_www_assets() {
         www_dir="$(python -m site --user-site)/airflow/www"
     fi
     pushd ${www_dir} || exit 1
-    yarn install --frozen-lockfile --no-cache
-    yarn run prod
+    set +e
+    yarn install --frozen-lockfile --no-cache 2>/tmp/out-yarn-install.txt
+    local res=$?
+    if [[ ${res} != 0 ]]; then
+        >&2 echo
+        >&2 echo "Error when running yarn install:"
+        >&2 echo
+        >&2 cat /tmp/out-yarn-install.txt
+        exit 1
+    fi
+    yarn run prod 2>/tmp/out-yarn-run.txt
+    res=$?
+    if [[ ${res} != 0 ]]; then
+        >&2 echo
+        >&2 echo "Error when running yarn install:"
+        >&2 echo
+        >&2 cat /tmp/out-yarn-run.txt
+        exit 1
+    fi
+    set -e
     find package.json yarn.lock static/css static/js -type f | sort | xargs 
md5sum > "${md5sum_file}"

Review comment:
       Should we remove `/tmp/out-yarn-run.txt` also?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to