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

Rewrite the main loop #129

Closed
5 tasks
dasJ opened this issue Aug 26, 2016 · 0 comments
Closed
5 tasks

Rewrite the main loop #129

dasJ opened this issue Aug 26, 2016 · 0 comments
Milestone

Comments

@dasJ
Copy link
Contributor

dasJ commented Aug 26, 2016

The current main loop has a few downsides. It should really be improved.

Dowsides:

Proposal

When the user cd's, we look for the common part of the source- and destination-directory (e.g. coming from /home/alice/myproject/obj and going to /home/alice/myproject/src has /home/alice/myproject in common).

Up from the source directory to the common part, we execute all unload files execpt when crossing a mountpoint. Unless mountpoint crossing is enabled, we will stop executing unload files.

From the common part down to the destination directory, we will execute all .env files.

When source == destination, we execute all unload files until we reach the mountpoint and then go back down to the directory, executing all .env files. This is used when initializing autoenv and can be used by the user to force execution.

Each .env file (or unload file) can set a variable like AUTOENV_STOP which will stop execution of this direction. So when it's called in an unload script, the .env files are still executed.

@dasJ dasJ added this to the 0.3.0 milestone Aug 26, 2016
@dasJ dasJ self-assigned this Aug 26, 2016
@dasJ dasJ modified the milestones: 0.4.0, 0.3.0 Sep 7, 2016
@dasJ dasJ removed their assignment Sep 8, 2016
@dasJ dasJ closed this as completed Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant