Skip to content

Commit

Permalink
(#74) Unlink node_modules before syncing back
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed Oct 22, 2020
1 parent f66c926 commit b22c4c3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/common/scripts/execute_testsuite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ $@
SAKULI_RETURN_CODE=$?
popd

# unlink global node_modules in ${SAKULI_EXECUTION_DIR}
[[ $DEBUG == true ]] && echo "remove global node_modules link from ${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}."
[ -L "${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}/node_modules" ] && rm ${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}/node_modules
[[ $DEBUG == true ]] && echo "remove global node_modules link from ${SAKULI_EXECUTION_DIR}."
[ -L "${SAKULI_EXECUTION_DIR}/node_modules" ] && rm ${SAKULI_EXECUTION_DIR}/node_modules

## Restore logs and screenshots into the actual mounted volume, if possible
if [ -z "$GIT_URL" ]; then
[[ $DEBUG == true ]] && echo "Restoring testsuite to ${SAKULI_TEST_SUITE}."
Expand All @@ -63,10 +69,4 @@ if [ -z "$GIT_URL" ]; then
[ $? -ne 0 ] && echo -e "ERROR: Could not restore logs and screenshots due to insufficient permissions."
fi

# unlink global node_modules in ${SAKULI_EXECUTION_DIR}
[[ $DEBUG == true ]] && echo "Unlink global node_modules from ${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}."
[ -L "${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}/node_modules" ] && unlink ${SAKULI_EXECUTION_DIR}/${SAKULI_SUITE_NAME}/node_modules
[[ $DEBUG == true ]] && echo "Unlink global node_modules from ${SAKULI_EXECUTION_DIR}."
[ -L "${SAKULI_EXECUTION_DIR}/node_modules" ] && unlink ${SAKULI_EXECUTION_DIR}/node_modules

exit ${SAKULI_RETURN_CODE}

0 comments on commit b22c4c3

Please sign in to comment.