From dacb06fdc866a32712354fd87311c508a0a9a0df Mon Sep 17 00:00:00 2001 From: openhands Date: Thu, 30 Oct 2025 12:49:04 +0000 Subject: [PATCH] Fix yq syntax in deployment script for Debian yq version --- deploy/ssh/deploy-remote.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy/ssh/deploy-remote.sh b/deploy/ssh/deploy-remote.sh index bb9d495..d05f0cd 100755 --- a/deploy/ssh/deploy-remote.sh +++ b/deploy/ssh/deploy-remote.sh @@ -111,20 +111,20 @@ load_configuration() { # Check if yq is available for YAML parsing if ! command -v yq &> /dev/null; then - print_error "yq is required for YAML parsing. Install with: snap install yq or brew install yq" + print_error "yq is required for YAML parsing. Install with: apt-get install yq" exit 1 fi - # Extract configuration values - SSH_HOST=$(yq e '.ssh.host' "$CONFIG_FILE") - SSH_PORT=$(yq e '.ssh.port' "$CONFIG_FILE") - SSH_USERNAME=$(yq e '.ssh.username' "$CONFIG_FILE") - SSH_KEY_FILE=$(yq e '.ssh.key_file' "$CONFIG_FILE") + # Extract configuration values (yq with jq syntax) + SSH_HOST=$(yq -r '.ssh.host' "$CONFIG_FILE") + SSH_PORT=$(yq -r '.ssh.port' "$CONFIG_FILE") + SSH_USERNAME=$(yq -r '.ssh.username' "$CONFIG_FILE") + SSH_KEY_FILE=$(yq -r '.ssh.key_file' "$CONFIG_FILE") - TARGET_DIR=$(yq e '.deployment.target_dir' "$CONFIG_FILE") - BACKUP_DIR=$(yq e '.deployment.backup_dir' "$CONFIG_FILE") - LOG_DIR=$(yq e '.deployment.log_dir' "$CONFIG_FILE") - CONFIG_DIR=$(yq e '.deployment.config_dir' "$CONFIG_FILE") + TARGET_DIR=$(yq -r '.deployment.target_dir' "$CONFIG_FILE") + BACKUP_DIR=$(yq -r '.deployment.backup_dir' "$CONFIG_FILE") + LOG_DIR=$(yq -r '.deployment.log_dir' "$CONFIG_FILE") + CONFIG_DIR=$(yq -r '.deployment.config_dir' "$CONFIG_FILE") # Validate required configuration if [[ -z "$SSH_HOST" || -z "$SSH_USERNAME" || -z "$SSH_KEY_FILE" ]]; then