Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update run-ansible.sh #630

wants to merge 1 commit into from

Conversation

carebare47
Copy link
Contributor

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

  • No tests required to be added. (For small changes that will be tested by CI/CD infrastructure).
  • Added/Modified automated and PhantomHand CI tests (if a new class is added (Python or C++), the interface of that class must be unit tested).
  • Manually tested in simulation (if simulation specific or no hardware required to test the functionality).
  • Manually tested on hardware (if hardware specific or related).

Documentation

  • No documentation required to be added.
  • Added documentation (For any new feature, explain what it does and how to use it. Write the documentation in a relevant space, e.g. Github, Confluence, etc).
  • Updated documentation (For changes to pre-existing features mentioned in the documentation).

@carebare47 carebare47 requested review from a team as code owners November 8, 2024 11:11
bin/run-ansible.sh Show resolved Hide resolved
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
Copy link
Contributor

@rnzenha-s rnzenha-s Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you do

Suggested change
echo "wsl.exe --distribution \"\${WSL_DISTRO_NAME}\" --user root --exec /usr/sbin/service docker start" >> ~/.bashrc
echo ${WSL_START_DOCKER_COMMAND} >> ~/.bashrc

?

Copy link
Contributor Author

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

Copy link
Contributor

@niko-holmes niko-holmes Nov 13, 2024

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.

Copy link
Contributor

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.

Comment on lines +376 to 377
${WSL_START_DOCKER_COMMAND}
wsl.exe --distribution "${WSL_DISTRO_NAME}" --user root --exec /usr/sbin/service docker start
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants