-
Notifications
You must be signed in to change notification settings - Fork 23
Make log dir optional #322
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
Changes from all commits
6ddf339
a85299f
5a05f66
85cfb3b
72ba0e7
d6bf986
fb04cae
5873d25
87fcafd
bad7f74
e0fa11b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import * as os from "os" | ||
import url from "url" | ||
|
||
export interface AuthorityParts { | ||
|
@@ -58,3 +59,13 @@ export function toSafeHost(rawUrl: string): string { | |
// should already have thrown in that case. | ||
return url.domainToASCII(u.hostname) || u.hostname | ||
} | ||
|
||
/** | ||
* Expand a path with ${userHome} in the input string | ||
* @param input string | ||
* @returns string | ||
Comment on lines
+65
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very tiny nit/question: are these valuable with TypeScript? My knee-jerk reaction is that at best it duplicates the info TypeScript gives and at worse it could get out of sync if someone changes the signature but not the comment. But, maybe there is some IDE tooling that uses these. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't have strong opinions on this at all, my default was just to document the function however typescript folks usually do. I'll leave it for now so you don't have to re-review haha. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair fair! No worries about re-review for small things like this, by the way. :) For the most part once you have an approval you are free to merge. If you make a big change or something though you might want a re-review. |
||
*/ | ||
export function expandPath(input: string): string { | ||
const userHome = os.homedir() | ||
return input.replace(/\${userHome}/g, userHome) | ||
} |
Uh oh!
There was an error while loading. Please reload this page.