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

Added ability to use tilde as home dir in config for cloning repos #32222

Merged
merged 1 commit into from Nov 10, 2017

Conversation

Projects
None yet
5 participants
@dericcain
Contributor

dericcain commented Aug 10, 2017

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.

@joaomoreno joaomoreno added this to the Backlog milestone Aug 10, 2017

@dericcain

This comment has been minimized.

Show comment
Hide comment
@dericcain

dericcain Aug 10, 2017

Contributor

@joaomoreno Any idea what the error in Travis is? Doesn't seem like it has to do with my code.

Contributor

dericcain commented Aug 10, 2017

@joaomoreno Any idea what the error in Travis is? Doesn't seem like it has to do with my code.

@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Aug 11, 2017

Member

It's unrelated. Closing and opening PR to resubmit build.

Member

joaomoreno commented Aug 11, 2017

It's unrelated. Closing and opening PR to resubmit build.

const value = config.get<string>('defaultCloneDirectory') || os.homedir();
let value;
const userInputtedDirectory = config.get<string>('defaultCloneDirectory');
if (userInputtedDirectory !== undefined && userInputtedDirectory.match(/^~/)) {

This comment has been minimized.

@jcperez

jcperez Aug 26, 2017

Why not use if (userInputtedDirectory && userInputtedDirectory.match(/^~/)) {?

@jcperez

jcperez Aug 26, 2017

Why not use if (userInputtedDirectory && userInputtedDirectory.match(/^~/)) {?

This comment has been minimized.

@dericcain

dericcain Aug 26, 2017

Contributor

@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.

@dericcain

dericcain Aug 26, 2017

Contributor

@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.

@Microsoft Microsoft deleted a comment from msftclas Sep 26, 2017

@Microsoft Microsoft deleted a comment from msftclas Sep 26, 2017

@joaomoreno joaomoreno merged commit 56539e2 into Microsoft:master Nov 10, 2017

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Nov 10, 2017

Member

Thanks! 🍻

Member

joaomoreno commented Nov 10, 2017

Thanks! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment