- The changes introduce a new
DependencyErrorclass inkamal/cli.rbalongside other error classes likeBootErrorandHookError. This new error class will be used to handle dependency-related failures. - In
kamal/cli/base.rb, a new methodensure_docker_installedis added which checks for Docker and buildx plugin installation locally. It raises the newDependencyErrorwith appropriate messages if either Docker or buildx plugin are not found, replacing similar functionality that was previously scattered elsewhere. - The
kamal/cli/build.rbfile is modified to use the newensure_docker_installedmethod instead of the removedverify_local_dependenciesmethod. The error handling is now consistent, usingDependencyErrorinstead ofBuildErrorfor dependency-related failures. - The
kamal/cli/registry.rbfile now includes a call toensure_docker_installedat the start of the login method, ensuring Docker is available before attempting registry operations. - The
kamal/commands/base.rbfile adds a new public methodensure_docker_installedthat combines checks for both Docker and buildx plugin installation, moving this functionality from the Builder class. - The
kamal/commands/builder.rbfile is simplified by removing theensure_local_dependencies_installedmethod and related private methods, as this functionality has been moved to the base commands class. - Test files are updated to reflect these changes, with
build_test.rbnow expectingDependencyErrorinstead ofBuildErrorfor dependency failures, andregistry_test.rbadding a new test case for Docker dependency checking during login.