Skip to content

Commit

Permalink
(#47) backup/restore original node_modules if present
Browse files Browse the repository at this point in the history
  • Loading branch information
svettwer committed Jul 21, 2020
1 parent 39b7731 commit f3b206e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/scripts/vnc_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ fi

# Link global node_modules into the actual test suite
if [ "${SAKULI_TEST_SUITE}" ]; then
if [ -d ${SAKULI_TEST_SUITE}/node_modules ]; then
mv ${SAKULI_TEST_SUITE}/node_modules ${SAKULI_TEST_SUITE}/node_modules_bak
fi
ln -s $(npm root -g | head -n 1) ${SAKULI_TEST_SUITE}/node_modules
fi

Expand All @@ -121,5 +124,9 @@ fi

# Remove the link to the actual test suite as it is most likely a mounted volume
if [ -d ${SAKULI_TEST_SUITE}/node_modules ]; then
rm ${SAKULI_TEST_SUITE}/node_modules
rm -r ${SAKULI_TEST_SUITE}/node_modules
fi

if [ -d ${SAKULI_TEST_SUITE}/node_modules_bak ]; then
mv ${SAKULI_TEST_SUITE}/node_modules_bak ${SAKULI_TEST_SUITE}/node_modules
fi

0 comments on commit f3b206e

Please sign in to comment.