Skip to content

Draft: Exit non-zero when requested info is not available

Hugo Barrera requested to merge WhyNotHugo/apk-tools:err-when-unavailable into master

When requesting information that was not available, apk would yield an empty response, which can be ambiguous. E.g.: apk info --triggers ruby would return an empty response, which could mean either (1) information not available, or (2) package ruby has no triggers.

When the information is not available, exit 1 instead.

  • TODO: 1 is not the correct exit code. I'm not sure which one would be best.
  • TODO: Some flags (e.g.: --rinstall-if) return partial results when related packages are not installed. This should at least be well documented.

See: #11010

Merge request reports