Added ability to use tilde as home dir in config for cloning repos#32222
Merged
joaomoreno merged 1 commit intomasterfrom Nov 10, 2017
unknown repository
Merged
Added ability to use tilde as home dir in config for cloning repos#32222joaomoreno merged 1 commit intomasterfrom unknown repository
joaomoreno merged 1 commit intomasterfrom
unknown repository
Conversation
Author
|
@joaomoreno Any idea what the error in Travis is? Doesn't seem like it has to do with my code. |
Member
|
It's unrelated. Closing and opening PR to resubmit build. |
jcperez
reviewed
Aug 26, 2017
| const value = config.get<string>('defaultCloneDirectory') || os.homedir(); | ||
| let value; | ||
| const userInputtedDirectory = config.get<string>('defaultCloneDirectory'); | ||
| if (userInputtedDirectory !== undefined && userInputtedDirectory.match(/^~/)) { |
There was a problem hiding this comment.
Why not use if (userInputtedDirectory && userInputtedDirectory.match(/^~/)) {?
Author
There was a problem hiding this comment.
@jcperez I could have written it that way and it would have worked, but I am being more explicit with the code I write these days.
Member
|
Thanks! 🍻 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Previously, when a user set the default location, in their config, for a repo to be cloned and they used a
~, cloning a repo would fail because VSCode did not know how to handle the~. This PR fixes that.