diff --git a/.circleci/setup-virtualenv.sh b/.circleci/setup-virtualenv.sh index 40f803db1..b2e38cbba 100755 --- a/.circleci/setup-virtualenv.sh +++ b/.circleci/setup-virtualenv.sh @@ -7,8 +7,9 @@ TAHOE_LAFS_TOX_ARGS=$1 shift || : # Make sure the ownership of the pip cache directory is correct. The CircleCI -# cache management operations seem to mess it up. -sudo chown --recursive nobody /tmp/nobody/.cache +# cache management operations seem to mess it up. The cache directory might +# not exist if there was no matching cache to restore. +[ -e /tmp/nobody/.cache ] && sudo chown --recursive nobody /tmp/nobody/.cache # Set up the virtualenv as a non-root user so we can run the test suite as a # non-root user. See below.