Fix Python script file path passing in localize_yml_file
The Python script wasn't receiving the file path correctly because heredoc syntax doesn't support command-line arguments the way it was written. Changed to use environment variable COMPOSE_FILE_PATH instead. This fixes the SyntaxError that occurred during deployment where Python was trying to parse YAML as Python code.
This commit is contained in:
@@ -232,12 +232,12 @@ localize_yml_file() {
|
||||
fi
|
||||
|
||||
# Use Python to process only labels and x-dockge sections
|
||||
python3 << 'PYEOF' "$file_path"
|
||||
COMPOSE_FILE_PATH="$file_path" python3 << 'PYEOF'
|
||||
import sys
|
||||
import re
|
||||
import os
|
||||
|
||||
file_path = sys.argv[1]
|
||||
file_path = os.environ.get('COMPOSE_FILE_PATH')
|
||||
|
||||
with open(file_path, 'r') as f:
|
||||
lines = f.readlines()
|
||||
|
||||
Reference in New Issue
Block a user