v2.26.4: fix Environment Configurator crash when .env variable missing (#191)

read_env_var() grep pipeline failed under set -euo pipefail when .env
existed but didn't contain the requested key. grep returned 1 (no match),
pipefail propagated it, and set -e killed the script.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-03-14 15:44:48 +00:00
parent fd7d01fc7d
commit faf57741a1
4 changed files with 17 additions and 3 deletions

View File

@@ -2,6 +2,13 @@
All notable changes to iNTERCEPT will be documented in this file.
## [2.26.4] - 2026-03-14
### Fixed
- **Environment Configurator crash** — `read_env_var()` crashed with "Setup failed at line 2333" when `.env` existed but didn't contain the variable being looked up. `grep` returned exit code 1 (no match), which `pipefail` propagated and `set -e` turned into a fatal error. Fixed by appending `|| true` to the pipeline. (#191)
---
## [2.26.3] - 2026-03-13
### Fixed

View File

@@ -7,10 +7,17 @@ import os
import sys
# Application version
VERSION = "2.26.3"
VERSION = "2.26.4"
# Changelog - latest release notes (shown on welcome screen)
CHANGELOG = [
{
"version": "2.26.4",
"date": "March 2026",
"highlights": [
"Fix Environment Configurator crash when .env exists but variable is missing",
]
},
{
"version": "2.26.3",
"date": "March 2026",

View File

@@ -1,6 +1,6 @@
[project]
name = "intercept"
version = "2.26.3"
version = "2.26.4"
description = "Signal Intelligence Platform - Pager/433MHz/ADS-B/Satellite/WiFi/Bluetooth"
readme = "README.md"
requires-python = ">=3.9"

View File

@@ -174,7 +174,7 @@ read_env_var() {
local fallback="${2:-}"
if [[ -f "$SCRIPT_DIR/.env" ]]; then
local val
val=$(grep -E "^${key}=" "$SCRIPT_DIR/.env" 2>/dev/null | tail -1 | cut -d'=' -f2-)
val=$(grep -E "^${key}=" "$SCRIPT_DIR/.env" 2>/dev/null | tail -1 | cut -d'=' -f2- || true)
if [[ -n "$val" ]]; then
# Strip surrounding quotes
val="${val#\"}"