mirror of
https://github.com/shadoll/just-commons.git
synced 2025-12-20 02:25:47 +00:00
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:
@@ -55,7 +55,7 @@ volumes-remove volume_name:
|
||||
runtime=$(just _detect_runtime)
|
||||
|
||||
# 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}}"
|
||||
exit 0
|
||||
fi
|
||||
@@ -91,7 +91,7 @@ volumes-remove-pattern pattern:
|
||||
runtime=$(just _detect_runtime)
|
||||
|
||||
# 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
|
||||
echo -e "{{YELLOW}}No volumes found matching pattern: $pattern{{NC}}"
|
||||
|
||||
Reference in New Issue
Block a user