Skip to content

Commit 91cd9f6

Browse files
fix(build): provide logging stubs for Lighthouse NPM security scan step
npm.sh uses log_info/log_warn/log_error/log_debug from openshift.sh, which is normally loaded via _utils.sh. The standalone CI step only sourced npm.sh, causing 'log_info: command not found' (exit 127). Define minimal logging function stubs inline before sourcing npm.sh, matching the fallback definitions in _utils.sh.
1 parent 777d164 commit 91cd9f6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,15 @@ jobs:
267267
- name: 🔒 Lighthouse NPM security scan (fail-fast)
268268
run: |
269269
echo "=== 🔒 Lighthouse Dependency Security Scan ==="
270+
271+
# npm.sh uses log_info/log_warn/etc. from openshift.sh — define stubs for CI context
272+
log_error() { echo "❌ $*" >&2; }
273+
log_warn() { echo "⚠️ $*"; }
274+
log_info() { echo "ℹ️ $*"; }
275+
log_debug() { [[ "${DEBUG_LEVEL}" == "DEBUG" || "${DEBUG_LEVEL}" == "TRACE" ]] && echo "🔍 $*" || true; }
276+
log_success() { echo "✅ $*"; }
277+
export -f log_error log_warn log_info log_debug log_success
278+
270279
source openshift/scripts/utils/npm.sh
271280
cd config/lighthouse
272281

0 commit comments

Comments
 (0)