Closed Oddant1 closed 9 months ago
@gregcaporaso we would need to write to the user's home directory which I wanted to avoid doing. There may be some sort of work around for that, I didn't look too hard for one.
That makes sense. How about confirming that the resulting path starts with os.environ['HOME']
? (And I realize it's incredibly unlikely that this single line of code you're adding is buggy - I'm just aiming to prevent against a regression where someone removes this line because they assume Click is going to handle it.)
@gregcaporaso I just added a kinda real test, seemed like the thing to do. It wasn't difficult to work around writing to home which I figured it wouldn't be. Probably should have just done it already.
Closes #308 by expanding the
~
usingos.path.expanduser
allowing keyed de-facto collection elements to use a path starting with~
.