diff --git a/lib/core.sh b/lib/core.sh index 061beaf..e6a5481 100644 --- a/lib/core.sh +++ b/lib/core.sh @@ -176,7 +176,7 @@ function _run_proot(){ function _run_juju_with_proot(){ - [ "$(_run_proot ${ID} 2> /dev/null )" == "0" ] && \ + [ "$(_run_proot "" ${ID} 2> /dev/null )" == "0" ] && \ die "You cannot access with root privileges. Use --root option instead." _run_proot "${@}" diff --git a/tests/test_core.sh b/tests/test_core.sh index 6dc4705..035e9f9 100755 --- a/tests/test_core.sh +++ b/tests/test_core.sh @@ -24,6 +24,8 @@ function set_up(){ function tear_down(){ + # the CA directories are read only and can be deleted only by changing the mod + [ -d ${JUJU_HOME}/etc/ca-certificates ] && chmod -R +w ${JUJU_HOME}/etc/ca-certificates rm -rf $JUJU_HOME rm -rf $ORIGIN_WD rm -rf $JUJU_TEMPDIR