1
0
forked from baron/baron-sso

code-check 오류 수정

This commit is contained in:
2026-06-05 20:37:23 +09:00
parent 87a45f0e76
commit 01cd7a0ad3
5 changed files with 25 additions and 19 deletions

View File

@@ -128,8 +128,9 @@ run_with_retry() {
return "$exit_code"
}
playwright_install_cmd=(npx playwright install)
playwright_install_desc="npx playwright install"
playwright_cli="$repo_root/node_modules/.pnpm/@playwright+test@1.60.0/node_modules/@playwright/test/cli.js"
playwright_install_cmd=(node "$playwright_cli" install)
playwright_install_desc="node $playwright_cli install"
playwright_project_args=()
has_webkit_host_dependencies() {
@@ -179,21 +180,21 @@ has_webkit_host_dependencies() {
}
if [ "$(id -u)" -eq 0 ]; then
playwright_install_cmd=(npx playwright install --with-deps)
playwright_install_desc="npx playwright install --with-deps"
playwright_install_cmd=(node "$playwright_cli" install --with-deps)
playwright_install_desc="node $playwright_cli install --with-deps"
elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
playwright_install_cmd=(npx playwright install --with-deps)
playwright_install_desc="npx playwright install --with-deps"
playwright_install_cmd=(node "$playwright_cli" install --with-deps)
playwright_install_desc="node $playwright_cli install --with-deps"
elif ! has_webkit_host_dependencies; then
playwright_install_cmd=(npx playwright install chromium firefox)
playwright_install_desc="npx playwright install chromium firefox"
playwright_install_cmd=(node "$playwright_cli" install chromium firefox)
playwright_install_desc="node $playwright_cli install chromium firefox"
playwright_project_args=(--project=chromium --project=firefox)
{
echo "# Adminfront WebKit Skipped"
echo
echo "- Reason: WebKit host dependencies are not installed and this user cannot run passwordless sudo."
echo "- Action: Running Chromium and Firefox projects only."
echo "- To enable WebKit locally: run \`cd adminfront && npx playwright install-deps webkit\` with sudo privileges."
echo "- To enable WebKit locally: run \`cd adminfront && node $playwright_cli install-deps webkit\` with sudo privileges."
} > reports/adminfront-webkit-skipped.md
fi
@@ -295,10 +296,11 @@ if ! is_port_available "$port"; then
port="$fallback_port"
fi
echo "==> adminfront using PORT=$port"
playwright_test_cli="$tmp_dir/adminfront/node_modules/.pnpm/@playwright+test@1.60.0/node_modules/@playwright/test/cli.js"
(
cd "$tmp_dir/adminfront"
CI=true PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \
pnpm exec playwright test --max-failures=1 "${playwright_project_args[@]}"
node "$playwright_test_cli" test --max-failures=1 "${playwright_project_args[@]}"
) 2>&1 | tee reports/adminfront-test.log
test_exit_code=${PIPESTATUS[0]}
set -e