File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " DevTool" ,
33 "id" : " devtool" ,
4- "version" : " 1.0.1 " ,
4+ "version" : " 1.0.2 " ,
55 "description" : " Install DevTool" ,
66 "installsAfter" : [
77 " ghcr.io/devcontainers/features/common-utils"
Original file line number Diff line number Diff line change 4949tee -a " $DEVTOOL_SCRIPT_PATH " > /dev/null \
5050<< 'EOF '
5151
52- echo "Installing DevTool ..."
52+ echo "::step::Waiting for AzDO Authentication Helper ..."
5353# Wait up to 3 minutes for the ado-auth-helper to be installed
5454for i in {1..180}; do
5555 if [ -f ${HOME}/ado-auth-helper ]; then
5656 break
5757 fi
5858 sleep 1
5959done
60-
60+ echo "::step::Installing DevTool..."
6161cd /tmp
6262curl -sL https://aka.ms/InstallToolLinux.sh | sh -s DevTool
6363EOF
6464
6565chmod 755 " $DEVTOOL_SCRIPT_PATH "
6666
67+ # Setup PATH so that DevTool will be on PATH when the initial terminal is started
68+ if command -v sudo > /dev/null 2>&1 ; then
69+ if [ " root" != " $_REMOTE_USER " ]; then
70+ echo " Adding DevTool to PATH for $_REMOTE_USER "
71+ sudo -u ${_REMOTE_USER} bash -c ' echo "export PATH=\$PATH:$HOME/.config/DevTool/CurrentVersion" >> ~/.bashrc'
72+ sudo -u ${_REMOTE_USER} bash -c ' echo "export PATH=\$PATH:$HOME/.config/DevTool/CurrentVersion" >> ~/.zshrc'
73+ exit 0
74+ fi
75+ fi
76+
77+ echo " Adding DevTool to PATH for root"
78+ echo " export PATH=\$ PATH:/root/.config/DevTool/CurrentVersion" >> /etc/bash.bashrc || true
79+ echo " export PATH=\$ PATH:/root/.config/DevTool/CurrentVersion" >> /etc/zsh/zshrc || true
80+
6781exit 0
Original file line number Diff line number Diff line change 66source dev-container-features-test-lib
77
88# Feature-specific tests
9- check " devtool" cat /usr/local/share/install-devtool.sh
10-
9+ check " devtool" grep " DevTool" <( cat ~ /.bashrc)
1110
1211# Report results
1312# If any of the checks above exited with a non-zero exit code, the test will fail.
You can’t perform that action at this time.
0 commit comments