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

Improvements to dotenv CLI #374

Merged
merged 1 commit into from
Feb 22, 2019
Merged

Improvements to dotenv CLI #374

merged 1 commit into from
Feb 22, 2019

Conversation

cadwallion
Copy link
Collaborator

This replaces the odd file parsing in the Dotenv::CLI with a proper OptionParser implementation that automatically handles converting the comma-separated list into an Array and with proper flag support.

This also adds --version and --help flag support to the CLI, since it's practically free with OptionParser.

Completes #371
/cc @olleolleolle

octobox dotenv (help) ./bin/dotenv --help
Usage: dotenv [options]

    -f FILES                         List of env files to parse
    -h, --help                       Display help
    -v, --version                    Show version

This replaces the odd file parsing in the Dotenv::CLI with a proper 
OptionParser implementation that automatically handles converting the 
comma-separated list into an Array and with proper flag support.

This also adds --version and --help flag support to the CLI, since it's 
practically free with OptionParser.
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

I like how readable the implementation of the options becomes by the introduction of the “controlling method” which calls the individual add_ option methods.

Having version number output helps operators.

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.

2 participants