Compare commits

..

7 Commits

2 changed files with 9 additions and 12 deletions

View File

@ -33,20 +33,17 @@ if [ "${HOME_USER-}" ]; then
sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc"
done
# Get the PATH of vscode user
VSCODE_PATH=$(sudo -u vscode -i echo $PATH)
# Copy the HOME variable from vscode user to HOME_USER
sudo su - ${HOME_USER} -c "echo 'export HOME=\"/home/\${HOME_USER}\"' >> ~/.bashrc"
# Add the PATH to the .bashrc of HOME_USER
sudo su - ${HOME_USER} -c "echo 'export PATH=$VSCODE_PATH' >> ~/.bashrc"
# Changing the property of the directory /home/${HOME_USER}
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/
# Copy the .bashrc file from vscode user to HOME_USER
sudo su - ${HOME_USER} -c "cat /home/vscode/.bashrc >> ~/.bashrc"
# Changing the HOME_USER in the .bashrc file
sudo su - ${HOME_USER} -c 'sed -i "s|/home/vscode|/home/${HOME_USER}|g" ~/.bashrc'
sudo su - ${HOME_USER} -c 'sudo sed -i "s|/home/vscode|/home/${HOME_USER}|g" ~/.bashrc'
# Switch to the user specified by $HOME_USER and start an interactive shell session.
sudo -u $HOME_USER -i
sudo su -l ${HOME_USER}
fi
fi
@ -93,7 +90,7 @@ else
fi
if [[ -z "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms"
sudo su - ${HOME_USER} -c "sudo code tunnel --accept-server-license-terms"
else
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}"
sudo su - ${HOME_USER} -c "sudo code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}"
fi

View File

@ -1 +1 @@
2.0.36
2.0.43