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

bootstrap: allow user to override BIN_DIR & USER_DATA_DIR #88

Conversation

thinkmassive
Copy link

Description

This tiny enhancement allows a user to specify alternate locations for the binaries and user-data. Overriding these values to a location where the user has write privileges will allow this script to run without root permissions.

It is probably an uncommon use case, and an advanced user should quickly notice these optional overrides when reviewing the script since they're at the very beginning. For this reason, I did not add a CLI parameter nor documentation.

TODOs

Read the Gruntwork contribution guidelines.

  • Update the docs.
  • Run the relevant tests successfully, including pre-commit checks.
  • Ensure any 3rd party code adheres with our license policy or delete this line if it's not applicable.
  • Include release notes. If this PR is backward incompatible, include a migration guide.

Release Notes (draft)

Added optional overrides for BIN_DIR and USER_DATA_DIR

Migration Guide

not applicable

This tiny enhancement allows a user to specify alternate locations for the
binaries and user-data. Overriding these values to a location where the user
has write privileges will allow this script to run without root permissions.

It is probably an uncommon use case, and an advanced user should quickly notice
these optional overrides when reviewing the script since they're at the very
beginning. For this reason, I did not add a CLI parameter nor documentation.
@@ -20,8 +20,8 @@

set -e

readonly BIN_DIR="/usr/local/bin"
readonly USER_DATA_DIR="/etc/user-data"
readonly BIN_DIR="${GRUNTWORK_BIN_DIR:-/usr/local/bin}"
Copy link
Member

Choose a reason for hiding this comment

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

I was wondering if having an integration test will be helpful here, to keep track that overrides are still working overtime

@thinkmassive thinkmassive deleted the feature/bootstrap-alternate-dirs-87 branch November 1, 2023 23:01
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.

Bootstrap script should allow alternate destinations for binaries and user-data Issues with fetch and PATH
2 participants