Files
html/api/ambre-pw-install.php
2026-04-21 16:35:02 +02:00

13 lines
566 B
PHP

<?php
header("Content-Type: text/plain");
$base = "/var/www/html/api/ambre-pw-tests";
// Try npm install
echo "=== npm install @playwright/test ===\n";
$out = @shell_exec("cd $base && timeout 120 npm install --no-audit --no-fund @playwright/test 2>&1 | tail -40");
echo $out ?? "(no output)";
echo "\n\n=== node_modules check ===\n";
echo @shell_exec("ls -la $base/node_modules/.bin/ 2>&1 | head -20");
echo "\n\n=== try run after install ===\n";
$run = @shell_exec("cd $base && timeout 3 ./node_modules/.bin/playwright --version 2>&1");
echo $run ?? "(no output)";