1
0

fix: make log viewer optional and document runtime dependencies

This commit is contained in:
2026-04-26 00:08:02 +02:00
parent 2ed34b97be
commit f3c649341a
4 changed files with 57 additions and 11 deletions
+6 -2
View File
@@ -22,7 +22,7 @@ The tool:
3. Displays an interactive multi-select checklist using `whiptail`
4. Executes the selected actions on each selected host through `ssh root@host`
5. Writes execution logs to `~/netupgrade.log`
6. Opens the log in `nano`, then optionally removes it
6. Opens the log with `$EDITOR` when available, otherwise `nano`, `vi`, or `less`; if none is available, it prints the log path, then optionally removes the log file
Supported action types currently include:
- `apt`
@@ -71,7 +71,9 @@ Supported action types currently include:
- The `docker-stacks` remote loop should be reviewed carefully for quoting and path safety
### 4. UX and dependency issues
- Required runtime dependencies are now checked at startup (`ssh`, `whiptail`, `nano`, `sed`, `tee`)
- Required runtime dependencies are now checked at startup (`ssh`, `whiptail`, `sed`, `tee`, `rm`, `touch`)
- Log viewing no longer depends strictly on `nano`; the script now falls back to `$EDITOR`, then `nano`, `vi`, or `less`
- If no supported log viewer is available, execution continues and the log path is shown
- The workflow is highly interactive and not well suited for automation
- `rm -i` introduces an extra prompt even when the rest of the flow is meant to be streamlined
@@ -111,6 +113,8 @@ Supported action types currently include:
- `README.md` was expanded to document installation, requirements, usage, configuration format, and supported actions
- `bin/netupgrade` help output was aligned with actual CLI behavior and now documents `--help`
- A startup dependency check was added before loading configuration or opening the interactive selector
- Log viewer selection was made more flexible: `$EDITOR` is preferred, then `nano`, `vi`, or `less`
- `nano` is no longer a strict runtime dependency
- The unsupported `-b` option remains unimplemented and is no longer shown in help output
## Change guidance