Support tilde (~) expansion in template paths#871
Merged
LasmarKhalifa merged 2 commits intoMay 12, 2026
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
46c5019 to
fd4c5a6
Compare
fd4c5a6 to
79f5c56
Compare
juniper-shopify
requested changes
May 12, 2026
Contributor
juniper-shopify
left a comment
There was a problem hiding this comment.
Looking very good! Just a couple tweaks and I think it'd be good to add a few more test cases for completeness
Contributor
Author
Thanks for the feedback!! Did the requested changes 🚀 |
Contributor
Author
Merge activity
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #663
Paths with a tilde currently do not get expanded in the CogInputManager#template. This PR fixes that.
Adds File.expand_path candidates to the template path resolver so that ~/foo and ~user/foo resolve correctly.
Rescue block makes sure we don't crash when expanding ~something/foo (assuming "something" is not a real user) and fall back to the other candidates instead.
Added test coverage