File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,16 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
66# Source the .env file from the parent directory of the script's directory
77source " $SCRIPT_DIR /../.env"
88
9- echo " Deploying backend to $BE_HOST with script $BE_SCRIPT_PATH "
9+ echo " Running $BE_SCRIPT_PATH on $BE_HOST with user $BE_USER "
1010
1111# Connect to SSH and execute remote script
1212ssh_output=$( ssh " $BE_USER @$BE_HOST " " $BE_SCRIPT_PATH " )
1313
14+ # Capture the exit code of the SSH command
15+ exit_code=$?
16+
1417# Print the output
15- echo " Remote script output:"
16- echo " $ssh_output "
18+ echo " $ssh_output "
19+
20+ # Forward the exit code of the remote script
21+ exit $exit_code
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const runCommand = (command, force) => {
3030 return output ;
3131 } catch ( error ) {
3232 console . error ( `Error executing command ${ command } ` ) ;
33- console . error ( error ) ;
33+ console . error ( error . output . toString ( ) ) ;
3434 process . exit ( 1 ) ;
3535 }
3636 }
You can’t perform that action at this time.
0 commit comments