CI: Update tox.ini to work with Ubuntu 2004
[docs.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index fd2d27eee447acb5fe2fbf64f567e368d2c4c244..7d840531be65110a6a05d4cf90b92a92ccad23bb 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -58,6 +58,9 @@ deps =
     PyEnchant
 allowlist_externals = sh
 commands =
-    sh -c 'command enchant>/dev/null || command enchant-2 -v>/dev/null || sudo yum -y install enchant || (echo "enchant command not found - please install it (e.g. sudo apt-get install enchant | yum install enchant )" >&2 && exit 1)'
+    sh -c 'command enchant>/dev/null || \
+           command enchant-2 -v>/dev/null || \
+           (sudo apt-get -qq update &&  sudo apt-get --yes install enchant-2) || \
+           sudo yum -y install enchant || \
+           (echo "enchant command not found - please install it (e.g. sudo apt-get install enchant | yum install enchant )" >&2 && exit 1)'
     sphinx-build -q -W --keep-going -b spelling -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/spelling
-