1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garage_ynh.git synced 2024-09-03 18:36:32 +02:00

fix test enough nodes

This commit is contained in:
oiseauroch 2023-12-16 20:59:36 +01:00
parent 8cb8872582
commit e40686a13c

View file

@ -43,13 +43,14 @@ apply_layout() {
garage_command=$1 garage_command=$1
$garage_command layout show 2>/dev/null $garage_command layout show 2>/dev/null
local layout_version=$($garage_command layout show 2>/dev/null | grep -Po -- "(?<=--version).*" | head -1 | xargs) if [ "$(./garage -c garage.toml layout show | grep 'This new layout cannot yet be applied')" ]
if [ "$layout_version" != "" ] if [ "$layout_version" != "" ]
then then
$garage_command layout apply --version $layout_version
else
ynh_print_warn --message="Unable to apply layout. No enough nodes" ynh_print_warn --message="Unable to apply layout. No enough nodes"
return 0 return 0
else
local layout_version=$($garage_command layout show 2>/dev/null | grep -Po -- "(?<=--version).*" | head -1 | xargs)
$garage_command layout apply --version $layout_version
fi fi
} }