Skip to content

Commit

Permalink
Workaround issue with devtoolset sudo (pytorch#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
jithunnair-amd authored and pruthvistony committed Aug 4, 2022
1 parent 57f8a60 commit af7c2e5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .circleci/docker/common/install_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ chown jenkins:jenkins /usr/local
# TODO: Maybe we shouldn't
echo 'jenkins ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/jenkins

# Work around bug where devtoolset replaces sudo and breaks it.
if [ -n "$DEVTOOLSET_VERSION" ]; then
SUDO=/bin/sudo
else
SUDO=sudo
fi

# Test that sudo works
sudo -u jenkins sudo -v
$SUDO -u jenkins $SUDO -v

0 comments on commit af7c2e5

Please sign in to comment.