Skip to content

Commit 4230e2e

Browse files
authored
Fixed issue with notify daemon. (#56)
* Fixed issue with notify daemon. * Improving error message on scp failure.
1 parent 044d549 commit 4230e2e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cromshell

+4-5
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,9 @@ function notify()
11071107
error "Creating notification daemon on host ${hostServer} ..."
11081108

11091109
# Send the script to the server:
1110-
scp ${SCRIPTDIR}/${SCRIPTNAME} ${hostServer}:~/. &> /dev/null
1111-
[[ $? -ne 0 ]] && error "ERROR: Could not copy cromshell to server ${hostServer}" && exit 7
1110+
local tmpOut=$( makeTemp )
1111+
scp ${SCRIPTDIR}/${SCRIPTNAME} ${hostServer}:~/. &> ${tmpOut}
1112+
[[ $? -ne 0 ]] && error "ERROR: Could not copy cromshell to server ${hostServer}" && error "$(cat ${tmpOut})" && exit 7
11121113

11131114
# Spin off notification process on the server:
11141115
results=$( ssh ${hostServer} "~/${SCRIPTNAME} notify ${WORKFLOW_ID} ${email} ${WORKFLOW_SERVER_URL}" )
@@ -1407,9 +1408,7 @@ if ${ISINTERACTIVESHELL} ; then
14071408

14081409
# Check if we need to set this up.
14091410
# Note: because of how `notify` works, we can't require the setup for the notify action.
1410-
#if ${CROMWELL_NEEDS_SETUP} && [[ "${SUB_COMMAND}" != "notify" ]] ; then
1411-
if ${CROMWELL_NEEDS_SETUP} ; then
1412-
1411+
if ${CROMWELL_NEEDS_SETUP} && [[ "${SUB_COMMAND}" != "notify" ]] ; then
14131412
# We need to setup this install.
14141413
# Now let's set it up:
14151414
which dialog &> /dev/null

0 commit comments

Comments
 (0)