Skip to content

Conversation

@fielding
Copy link
Contributor

@fielding fielding commented Oct 3, 2018

Depending on your shell and it's configuration, tilde might not be expanded to the user's home directory or might only expand at the beginning of a word or after specified characters, i.e. '='. This pr updates git2json to untildify path strings itself, so that the user doesn't have to worry about the shell expanding the paths or under what conditions the shell might do so.

I also normalized the path string using node's path.normalize for good measure.

Both of the above changes will be of great value for the PR I will be submitting soon for #7.

If you don't like the addition of the first true dependency let me know and I can just add an untildify function to git2json.js.

@fabien0102 fabien0102 self-requested a review October 4, 2018 08:44
@fabien0102
Copy link
Owner

@fielding I let you rebase this branch, I will publish a new npm version after merging this PR.

And don't worry about adding the first dependency, npm is made for that, let's not reinvent the wheel 👍

Normalize path strings
Reapply normalize and untildify functions to path after rebasing
@fielding fielding force-pushed the fix/tilde-expansion branch from 64cb77c to 9b6bb97 Compare October 8, 2018 23:01
@fielding
Copy link
Contributor Author

fielding commented Oct 8, 2018

Rebased and squashed branch. It should be good to go now :shipit:

Once this is merged I will rebase and submit the PR that implements the feature requested in #7 :neckbeard:

Cheers!

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