minikube image rm
Exits with 0 on Failure
#19687
Labels
area/image
Issues/PRs related to the minikube image subcommand
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/improvement
Categorizes issue or PR as related to improving upon a current feature.
What Happened?
Description
When running
minikube image rm
, the exit code is 0 even though the command fails to remove the image. A failure should result in a non-zero exit code, allowing scripts or CI processes to handle the failure properly.Steps to reproduce
Expected Behavior
When
minikube image rm
encounters an error (such as an image being in use), it should exit with a non-zero status code (e.g. 1), allowing proper error handling in scripts or pipelines.Actual Behavior
The command exits with a status code of 0, even though it reports an internal failure, which leads to downstream commands executing when they shouldn't.
Suggested Fix
Ensure that
minikube image rm
propagates the exit status of the underlying image removal process.\Environment
Attach the log file
log.txt
Operating System
Ubuntu
Driver
Docker
The text was updated successfully, but these errors were encountered: