Skip to content

Commit

Permalink
tools: don't display command not found (#1408)
Browse files Browse the repository at this point in the history
tools: don't display command not found in bash

Co-authored-by: Jonas Vautherin <[email protected]>
  • Loading branch information
julianoes and JonasVautherin authored Apr 13, 2021
1 parent b2ac6a7 commit 988a102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

dockerimage=mavsdk/mavsdk-ubuntu-20.04-px4-sitl-v1.11

if type podman > /dev/null
if type podman > /dev/null 2> /dev/null
then
podman run -it --rm -v $(pwd):/home/user/MAVSDK:z $dockerimage "$@"
echo "sudo needed to repair file ownership after podman ran: sudo chown -R $USER:$USER ."
sudo chown -R $USER:$USER .

elif type docker > /dev/null
elif type docker > /dev/null 2> /dev/null
then
docker run -it --rm -v $(pwd):/home/user/MAVSDK:z -e LOCAL_USER_ID=`id -u` $dockerimage "$@"

Expand Down

0 comments on commit 988a102

Please sign in to comment.