Skip to content

v1.0.0: feat(scan): Add dependency check before running

Choose a tag to compare

@github-actions github-actions released this 23 Apr 14:49
· 10 commits to main since this release
Implement a pre-run check for required external dependencies.

- Added `checkDependencies` function in `cmd/scan/run.go` to verify
  the presence of `scanimage` and `img2pdf` in the system's PATH
  using `os/exec.LookPath`. Imported the `os/exec` package.
- Integrated the dependency check into the `rootCmd.RunE` function.
  If dependencies are missing, an informative error message is
  displayed, and the program exits gracefully. This prevents
  runtime errors later during the scanning or PDF conversion process
  and improves user feedback.
- Updated `todo.md` to mark "Better error reporting" and "Release
  on Github" as completed.