Vagrant fix: pass util_dir in using env in shell provisioner, otherwise use dirname #4842
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I made these changes to get Vagrant working for me (in this case with Virtualbox). It should just impact how qmk_install.sh works when it's being run from Vagrant (
util_dir
will be passed in as/vagrant/util
, where the other shell scripts live on the Vagrant box) and otherwise will usedirname
. I also had to add-y
to apt-get, otherwise it aborted; and I removed the-update
argument to qmk_install.sh because from what I could tell it wasn't actually being used anywhere (maybe I missed something).Types of changes
Issues Fixed or Closed by this PR
I didn't find any open issues related to this, but I was getting the following output when running
VAGRANT_LOG=debug vagrant up
:It looked like this was because Vagrant uploads qmk_install.sh to /tmp/vagrant-shell on the VM, so the script was setting
util_dir
to/tmp
instead of the directory where the scripts actually live on the VM (/vagrant/util).The issue with
apt-get
was this:The
-y
flag fixed this. There's still an error for a missing signature on a puppetlabs.com repo whenapt-get update
runs, but it wasn't fatal so I didn't really look into it further. For reference:Checklist: