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

Add $MASK and $MASKFILE_DIR utility env variables #26

Merged
merged 13 commits into from
Jul 27, 2019

Conversation

jacobdeichert
Copy link
Owner

Describe the problem

When referring to a maskfile with --maskfile <path_to_maskfile>, scripts inside can't simply use mask <command> to call other subcommands since mask tries to look for a maskfile in the current directory you're calling from. The new instance of mask can't understand you called an external maskfile that's not within this directory.

Describe the solution

The solution to this is a utility environment variable, $MASK. Instead of your scripts calling mask <command>, to make them location-agnostic, you should use $MASK <command> instead. $MASK is just equal to mask --maskfile <path_to_maskfile> which means you no longer have to worry about where you call a maskfile from.

Another utility variable was also added: $MASKFILE_DIR. This allows us to refer to the directory the maskfile lives in which can be handy for loading relative files to it.

How to test

Use $MASK within a script to call another subcommand.

  • Added unit tests
  • Added integration tests

Types of changes

  • Bug fix
  • New feature
  • Breaking change

@jacobdeichert jacobdeichert merged commit e12344c into master Jul 27, 2019
@jacobdeichert jacobdeichert deleted the utility-env-vars branch April 4, 2020 15:26
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