diff --git a/.github/workflows/plugin-ci.yaml b/.github/workflows/plugin-ci.yaml index 07013b4..eceeb44 100644 --- a/.github/workflows/plugin-ci.yaml +++ b/.github/workflows/plugin-ci.yaml @@ -26,7 +26,9 @@ jobs: # Check for packageManager field in package.json (Corepack pinning). # pnpm/action-setup@v4 errors when `packageManager` is set (even without # a `version` input), so we use Corepack directly for those repos. - PM=$(node -e "try{const p=require('./package.json');const v=p.packageManager||'';console.log(v.startsWith('pnpm@')?'true':'false')}catch(e){console.log('false')}" 2>/dev/null || echo "false") + # Use python3 (pre-installed on Ubuntu ARC runners) instead of node, + # because node is not on PATH before the Setup Node step runs. + PM=$(python3 -c "import json,sys; d=json.load(open('package.json')); print('true' if d.get('packageManager','').startswith('pnpm@') else 'false')" 2>/dev/null || echo "false") echo "has_package_manager=$PM" >> $GITHUB_OUTPUT else echo "manager=npm" >> $GITHUB_OUTPUT