fix: Make sure "./run" is the invocation (#5724)

* fix: Make sure "./run" is the invocation

* Use $(dirname $0) instead of hacky test

* chore: Update docs
This commit is contained in:
Rich Salz 2023-06-08 16:27:23 -04:00 committed by GitHub
parent d18db5bb76
commit 32b90b99bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

@ -87,11 +87,10 @@ You can also open the datatracker project folder and click the **Reopen in conta
On Linux / macOS:
```sh
cd docker
./run
./docker/run # or whatever path you need
```
> Note that you can pass the `-r` flag to `./run` to force a rebuild of the containers. This is useful if you switched branches and that the existing containers still contain configurations from the old branch. You should also use this if you don't regularly keep up with main and your containers reflect a much older version of the branch.
> Note that you can pass the `-r` flag to `run` to force a rebuild of the containers. This is useful if you switched branches and that the existing containers still contain configurations from the old branch. You should also use this if you don't regularly keep up with main and your containers reflect a much older version of the branch.
On Windows *(using Powershell)*:
```sh

View file

@ -37,6 +37,15 @@ while getopts "hp:r" opt; do
esac
done
# Ensure the run script is in our directory.
dirname=$(dirname $0)
if [ "$dirname" = "." -o "$dirname" = "" ] ; then
:
else
echo "Changing to directory $dirname"
cd $dirname || exit 1
fi
# Remove mounted temp directories
rm -rf .parcel-cache __pycache__