Fix Docker template syntax in volume commands

- Escape {{.Name}} as {{{{.Name}}}} to avoid Just variable interpolation conflicts
- Fixes syntax errors in volumes-remove and volumes-remove-pattern commands
This commit is contained in:
sHa
2025-09-27 00:59:25 +03:00
parent 80cefd02dd
commit e2da0282ec

View File

@@ -55,7 +55,7 @@ volumes-remove volume_name:
runtime=$(just _detect_runtime) runtime=$(just _detect_runtime)
# Check if volume exists # Check if volume exists
if ! $runtime volume ls --format "table {{.Name}}" | grep -q "^${volume_name}$"; then if ! $runtime volume ls --format "table {{{{.Name}}}}" | grep -q "^${volume_name}$"; then
echo -e "{{YELLOW}}Volume '$volume_name' does not exist{{NC}}" echo -e "{{YELLOW}}Volume '$volume_name' does not exist{{NC}}"
exit 0 exit 0
fi fi
@@ -91,7 +91,7 @@ volumes-remove-pattern pattern:
runtime=$(just _detect_runtime) runtime=$(just _detect_runtime)
# Find matching volumes # Find matching volumes
matching_volumes=$($runtime volume ls --format "table {{.Name}}" | grep "$pattern" || true) matching_volumes=$($runtime volume ls --format "table {{{{.Name}}}}" | grep "$pattern" || true)
if [ -z "$matching_volumes" ]; then if [ -z "$matching_volumes" ]; then
echo -e "{{YELLOW}}No volumes found matching pattern: $pattern{{NC}}" echo -e "{{YELLOW}}No volumes found matching pattern: $pattern{{NC}}"