-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Install bats as root #7674
Install bats as root #7674
Conversation
@edsantiago thoughts? |
I would actually be fine requiring |
Lines 308 to 311 in dc23ef1
However, it would be hard to add the same thing to Lines 615 to 616 in dc23ef1
What about putting the check on
Or we could just document that |
Oh, or we could add a new prerequisite that checks for root:
|
I'm pretty strongly opposed to Can you just make a small tweak to if [[ "$(type -t bats)" != "" ]]; then
exit 0
fi |
That's fair.
So if bats is already installed, skip installation. What about when it isn't installed yet? |
Can |
Sure. I added the "skip if already installed" check and the sudo warning. |
I'm starting to like this better because now you know that it's trying to install to /usr/local when it asks for you password, and you can install bats yourself if you want to – the script will accept it as long as it's on your PATH. |
LGTM |
Installing bats to /usr/local requires root privileges. Without this, `make install.tools` fails. However, if I do `sudo make install.tools`, then all of the other dependencies and git clones in the current directory end up owned by root. This limits root privileges to the part that needs it. Signed-off-by: Jordan Christiansen <[email protected]>
LGTM |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, xordspar0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
🎉 |
Installing bats to /usr/local requires root privileges. Without this,
make install.tools
fails. However, if I dosudo make install.tools
, then all of the other dependencies and git clones in the current directory end up owned by root. This limits root privileges to the part that needs it.I'm not sure this is a very good solution. I wanted to open discussion about this issue because currently it's difficult to get a working test environment without digging into the Makefile and install scripts to see what's going on. Otherwise
make install.tools
fails like this:Another possible solution is installing bats to _output like the Go dependencies and invoking bats as
$GOBIN/bats
. Any other ideas?