mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
Merge pull request #858 from sliver2er/fix/install-missing-ajv-dependency
fix: move ajv to dependencies and auto-install deps in install scripts
This commit is contained in:
15
install.ps1
15
install.ps1
@@ -34,5 +34,20 @@ while ($true) {
|
|||||||
$scriptDir = Split-Path -Parent $scriptPath
|
$scriptDir = Split-Path -Parent $scriptPath
|
||||||
$installerScript = Join-Path -Path (Join-Path -Path $scriptDir -ChildPath 'scripts') -ChildPath 'install-apply.js'
|
$installerScript = Join-Path -Path (Join-Path -Path $scriptDir -ChildPath 'scripts') -ChildPath 'install-apply.js'
|
||||||
|
|
||||||
|
# Auto-install Node dependencies when running from a git clone
|
||||||
|
$nodeModules = Join-Path -Path $scriptDir -ChildPath 'node_modules'
|
||||||
|
if (-not (Test-Path -LiteralPath $nodeModules)) {
|
||||||
|
Write-Host '[ECC] Installing dependencies...'
|
||||||
|
Push-Location $scriptDir
|
||||||
|
try {
|
||||||
|
& npm install --no-audit --no-fund --loglevel=error
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-Error "npm install failed with exit code $LASTEXITCODE"
|
||||||
|
exit $LASTEXITCODE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally { Pop-Location }
|
||||||
|
}
|
||||||
|
|
||||||
& node $installerScript @args
|
& node $installerScript @args
|
||||||
exit $LASTEXITCODE
|
exit $LASTEXITCODE
|
||||||
|
|||||||
@@ -14,4 +14,10 @@ while [ -L "$SCRIPT_PATH" ]; do
|
|||||||
done
|
done
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
||||||
|
|
||||||
|
# Auto-install Node dependencies when running from a git clone
|
||||||
|
if [ ! -d "$SCRIPT_DIR/node_modules" ]; then
|
||||||
|
echo "[ECC] Installing dependencies..."
|
||||||
|
(cd "$SCRIPT_DIR" && npm install --no-audit --no-fund --loglevel=error)
|
||||||
|
fi
|
||||||
|
|
||||||
exec node "$SCRIPT_DIR/scripts/install-apply.js" "$@"
|
exec node "$SCRIPT_DIR/scripts/install-apply.js" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user