-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update run-ansible.sh #630
base: master
Are you sure you want to change the base?
Conversation
wsl.exe --distribution "${WSL_DISTRO_NAME}" --user root --exec /usr/sbin/service docker start | ||
fi | ||
fi | ||
if [[ $(cat ~/.bashrc | grep "wsl.exe --distribution \"\${WSL_DISTRO_NAME}\" --user root --exec /usr/sbin/service docker start" | wc -l) -eq 0 ]]; then | ||
echo "wsl.exe --distribution \"\${WSL_DISTRO_NAME}\" --user root --exec /usr/sbin/service docker start" >> ~/.bashrc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you do
echo "wsl.exe --distribution \"\${WSL_DISTRO_NAME}\" --user root --exec /usr/sbin/service docker start" >> ~/.bashrc | |
echo ${WSL_START_DOCKER_COMMAND} >> ~/.bashrc |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't make that work, not sure why :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the issue was ${WSL_DISTRO_NAME}
not being expanded inside ${WSL_START_DOCKER_COMMAND}
, the following should work.
If you define WSL_START_DOCKER_COMMAND
as "wsl.exe --distribution \"${WSL_DISTRO_NAME}\" --user root --exec /usr/sbin/service docker start"
on line 373.
Using single quotations prevents the string from being expanded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be able to do the same in the if statement in line 380 right above.
${WSL_START_DOCKER_COMMAND} | ||
wsl.exe --distribution "${WSL_DISTRO_NAME}" --user root --exec /usr/sbin/service docker start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is line 377 needed if we call WSL_START_DOCKER_COMMAND
right before?
Proposed changes
Please explain the changes you made. Add pictures or videos to explain them better if appropriate.
Checklist
Before posting a PR ensure that from each of the below categories AT LEAST ONE BOX HAS BEEN CHECKED. If more than one category is applicable then more can be checked. Also ensure that the proposed changes have been filled out with relevant information for reviewers.
Tests
Documentation