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

feat: improve environment support #206

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

Conversation

stevenh
Copy link

@stevenh stevenh commented Nov 21, 2023

Improve support for configuring the tool from the environment as is commonly used for CI use cases.

This adds the ability to read auth tokens from the DROPBOX_TOKENS environment variable instead of from the configuration file.

Also add the ability to configured the personal app key which wasn't named and now configurable using DROPBOX_PERSONAL_APP_KEY environment variable to match the other options.

Constants for config location and environment variable names are now stored in consts.go to make them more visible.

Some additional improvement in error checking and extracting the common configFile helper, including using stdlib os.UserHomeDir instead of the custom library version.

Switch from deprecated ioutil.ReadFile to supported os.ReadFile.

Improve support for configuring the tool from the environment as is
commonly used for CI use cases.

This adds the ability to read auth tokens from the DROPBOX_TOKENS
environment variable instead of from the configuration file.

Also add the ability to configured the personal app key which wasn't
named and now configurable using DROPBOX_PERSONAL_APP_KEY environment
variable to match the other options.

Constants for config location and environment variable names are now
stored in consts.go to make them more visible.

Some additional improvement in error checking and extracting the common
configFile helper, including using stdlib os.UserHomeDir instead of the
custom library version.

Switch from deprecated ioutil.ReadFile to supported os.ReadFile.
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.

1 participant