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

Load .aprc configs only once. #74

Merged
merged 2 commits into from
Jun 21, 2021
Merged

Load .aprc configs only once. #74

merged 2 commits into from
Jun 21, 2021

Conversation

HarlemSquirrel
Copy link
Member

Once we've loaded ~/.aprc stop loading it at each invokition in a pry session.

Fixes #73

@HarlemSquirrel HarlemSquirrel force-pushed the dotfile-load-once branch 2 times, most recently from c2f349d to 7c9cd4e Compare June 6, 2021 14:10
Once we've loaded ~/.aprc stop loading it at each invokition in a pry session.

Fixes #73
@@ -151,6 +163,8 @@ def merge_options!(options = {})
# predictable values
#---------------------------------------------------------------------------
def load_dotfile
return if @@dotfile # Load the dotfile only once.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is @@dotfile actually ever assigned to?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah in #dotfile_readable?

def dotfile_readable?(dotfile)
if @@dotfile_readable.nil? || @@dotfile != dotfile
@@dotfile_readable = File.readable?(@@dotfile = dotfile)
end

@paddor paddor merged commit dbac402 into master Jun 21, 2021
@paddor paddor deleted the dotfile-load-once branch June 21, 2021 06:18
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.

Default colors only last for one print
2 participants