wttech/gradle-environment-plugin

Unable to check docker network availability

mrSpectro opened this issue · 2 comments

Tech stack:

  • Ubuntu 20.04.5 LTS ARM
  • Docker version 23.0.0
  • Gradle environment plugin - any version

Behaviour:
NetworkAvailability check in Stack.kt uses hardcoded "Error: No such network" docker error string as a sign of non existing network. In latest Docker the the message returned in such case is "Error response from daemon: network <network_name> not found" - result of command: docker network inspect <network_name>
Because of this, network availability check throws an exception instead of false in case network is not there.

Thanks for reporting. Could you make a PR with fix as well? 🙂

to have backward and forward compatibility let's just check for not found or no such case-insensitive ;)