Skip to content

Respect explicitly empty optional configuration values - #95

Merged
Cyclenerd merged 1 commit into
Cyclenerd:masterfrom
dajiaohuang:fix/optional-empty-config-20261015
Oct 16, 2026
Merged

Cyclenerd merged 1 commit into
Cyclenerd:masterfrom
dajiaohuang:fix/optional-empty-config-20261015

Conversation

@dajiaohuang

Copy link
Copy Markdown
Contributor

Please Complete the Following

Notes

README instructs users to disable the traceroute dependency with MY_TRACEROUTE_HOST='', and config-example/status.sh document MY_STATUS_JSON='' to disable JSON output. Currently the :- defaults replace those explicit empty values, so traceroute is still required and status.json is still written. The icon's existing optional-output guard has the same problem.

Use unset-only defaults for these three optional settings. Unset options retain their current defaults; explicitly empty options reach the existing dependency/output guards unchanged.

Validation: bash test-optional-config.sh fails on master c698e65 and passes with this change, covering empty options, exclusion from the dependency array and unchanged unset defaults. ShellCheck 0.11.0 passes for status.sh and the regression script; diff whitespace check passes. An isolated full-generator fixture also passed when combined with the independent script-check/duration fixes.

Tests ran locally with Git Bash and synthetic inputs. Upstream live-network test.sh and Linux/macOS CI were not run locally.

@Cyclenerd
Cyclenerd merged commit 1d6683e into Cyclenerd:master Oct 16, 2026
3 checks passed
@Cyclenerd Cyclenerd self-assigned this Oct 16, 2026
@Cyclenerd

Copy link
Copy Markdown
Owner

Thank you 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants