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(find runfile): Adds support for $RUNFILE_ROOTS path variable #41

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

TekWizely
Copy link
Owner

@TekWizely TekWizely commented Oct 18, 2021

Adds support for $RUNFILE_ROOTS path variable

  • $RUNFILE_ROOTS is treated as a list of path entries (using standard os separator)
  • Behaves largely similar to GIT_CEILING_DIRECTORIES
  • If $PWD is a child of a root entry, walks-up looking for Runfile
  • Roots themselves are generally treated as exclusive (ie not checked)
  • $HOME, if a configured root, is treated as inclusive (ie IS checked)

general usage:

export RUNFILE_ROOTS="${HOME}"  # Will look in $HOME

most permissive:

export RUNFILE_ROOTS="/"  # Will not look in /
  • tbd: Update README

relates to #39
cc: @rburchell

* RUNFILE_ROOTS is treated as a list of path entries (using standard os separator)
* If $PWD is a child of a root entry, walks-up looking for Runfile
* Roots themselves are generally treated as exclusive (ie not checked)
* $HOME, if a configured root, is treated as inclusive (ie IS checked)

general usage:

  export RUNFILE_ROOTS="${HOME}"  # Will look in $HOME

most permissive:

  export RUNFILE_ROOTS="/"  # Will not look in /

tbd: Update README
@TekWizely TekWizely merged commit 75c6727 into master Oct 19, 2021
@TekWizely TekWizely deleted the runfile_roots branch October 19, 2021 04:44
@rburchell
Copy link
Contributor

@TekWizely Just looking into the git log for updates since I last updated run, and found this ticket, and immediately got very excited. Thanks very much, this looks like exactly what I was after!

Sorry for the late reply, for some reason, Github sent the notification of your cc to /dev/null, otherwise I would probably have replied a lot sooner...

It looks like if I set RUNFILE_ROOTS to contain the repository, then I'll be fine. Or perhaps $HOME, so I don't need to set it per repository... Anyway, I'll give it a shot in the coming days when I find time, and will let you know if I find any problems.

@TekWizely
Copy link
Owner Author

Just looking into the git log for updates since I last updated run

I love that you do that :)

It looks like if I set RUNFILE_ROOTS to contain the repository, then I'll be fine. Or perhaps $HOME, so I don't need to set it per repository

Remember its a PATH variable, so it can contain all of your repository parent folders, or just $HOME if they happen to all live under there (as mine do)

I'll give it a shot in the coming days when I find time, and will let you know if I find any problems.

I look forward to hearing your thoughts, thanks !

-TW

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