From caa50dc1a3e6a3772318f892c011821f0f89ad79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 14 Aug 2019 13:14:23 +0200 Subject: [PATCH] ci: Ensure eslint output exists We are a long time away from an error-free eslint run, but when we get there eventually, let's not trip over non-existent files ... https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/730 --- .gitlab-ci/run-eslint.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci/run-eslint.sh b/.gitlab-ci/run-eslint.sh index ae4aee979..edcdfc1fd 100755 --- a/.gitlab-ci/run-eslint.sh +++ b/.gitlab-ci/run-eslint.sh @@ -16,8 +16,14 @@ run_eslint() { ARGS_LEGACY='--config lint/eslintrc-legacy.json' local extra_args=ARGS_$1 - local output=OUTPUT_$1 - eslint -f unix ${!extra_args} -o ${!output} js + local output_var=OUTPUT_$1 + local output=${!output_var} + + # ensure output exists even if eslint doesn't report any errors + mkdir -p $(dirname $output) + touch $output + + eslint -f unix ${!extra_args} -o $output js } list_commit_range_additions() {