fix(scripts): resolve POSIX regex compatibility in validate-config.sh
- Replace \s* with [ \t]* for POSIX-compatible whitespace matching - Addresses false positive 'server port not configured' error - Ensures validation works correctly across all POSIX-compliant systems Related to DAW/furt#111
This commit is contained in:
parent
df1edf3dc5
commit
683d6e5e5d
1 changed files with 3 additions and 2 deletions
|
|
@ -24,12 +24,13 @@ if ! grep -q '^\[server\]' "$CONFIG_FILE"; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q '^port\s*=' "$CONFIG_FILE"; then
|
# Fix: Use POSIX-compatible regex patterns
|
||||||
|
if ! grep -q '^[ \t]*port[ \t]*=' "$CONFIG_FILE"; then
|
||||||
echo "Error: server port not configured"
|
echo "Error: server port not configured"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! grep -q '^host\s*=' "$CONFIG_FILE"; then
|
if ! grep -q '^[ \t]*host[ \t]*=' "$CONFIG_FILE"; then
|
||||||
echo "Error: server host not configured"
|
echo "Error: server host not configured"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue