fix lint warning + remove invalid local in top-level loop

- Split single-line try/catch to satisfy max-statements-per-line
- Remove `local` keyword from top-level for-loop (only valid in functions)
This commit is contained in:
Bilal Godil 2026-04-15 19:12:52 -07:00
parent 11531ebc4b
commit 7534637021
2 changed files with 7 additions and 4 deletions

View File

@ -662,9 +662,8 @@ for arch in "${TARGET_ARCHS[@]}"; do
download_cloud_image "$arch" "$local_base"
if [ "${SKIP_DOCKER_BUILD:-0}" = "1" ]; then
log "SKIP_DOCKER_BUILD=1: reusing pre-built Docker bundle"
local expected_bundle="$IMAGE_DIR/emulator-${arch}-docker-images.tar.gz"
if [ ! -f "$expected_bundle" ]; then
err "Pre-built bundle not found: $expected_bundle"
if [ ! -f "$IMAGE_DIR/emulator-${arch}-docker-images.tar.gz" ]; then
err "Pre-built bundle not found: $IMAGE_DIR/emulator-${arch}-docker-images.tar.gz"
exit 1
fi
else

View File

@ -151,7 +151,11 @@ function emulatorScriptsDir(): string {
// npm pack strips the execute bit from non-`bin` files, so restore it here.
function ensureExecutable(scriptsDir: string): string {
try { chmodSync(join(scriptsDir, "run-emulator.sh"), 0o755); } catch { /* best-effort */ }
try {
chmodSync(join(scriptsDir, "run-emulator.sh"), 0o755);
} catch {
// best-effort
}
return scriptsDir;
}