diff --git a/.gitignore b/.gitignore index eb9ceba7f..39910056b 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,6 @@ tests/.pytest_cache/ tests/binaries/*.o tests/binaries/*.out tests/binaries/gosample.x* + +# VS Code files +.vscode/ diff --git a/setup-test-tools.sh b/setup-test-tools.sh index a2b053d1b..99138eecc 100755 --- a/setup-test-tools.sh +++ b/setup-test-tools.sh @@ -5,10 +5,10 @@ echo "# Install testing tools." echo "# Only works with Ubuntu / APT." echo "# --------------------------------------" -# If we are a root in a Docker container and `sudo` doesn't exist +# If we are a root in a container and `sudo` doesn't exist # lets overwrite it with a function that just executes things passed to sudo # (yeah it won't work for sudo executed with flags) -if [ -f /.dockerenv ] && ! hash sudo 2>/dev/null && whoami | grep root; then +if ! hash sudo 2>/dev/null && whoami | grep root; then sudo() { ${*} } diff --git a/setup.sh b/setup.sh index 687a0ee60..48a89aede 100755 --- a/setup.sh +++ b/setup.sh @@ -1,10 +1,10 @@ #!/bin/bash set -ex -# If we are a root in a Docker container and `sudo` doesn't exist +# If we are a root in a container and `sudo` doesn't exist # lets overwrite it with a function that just executes things passed to sudo # (yeah it won't work for sudo executed with flags) -if [ -f /.dockerenv ] && ! hash sudo 2>/dev/null && whoami | grep root; then +if ! hash sudo 2>/dev/null && whoami | grep root; then sudo() { ${*} }