Fix paths on Windows. Closes #171
This commit is contained in:
parent
e7795c5349
commit
97d844c3d2
1
src/translations/de-DE.json
Normal file
1
src/translations/de-DE.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
1
src/translations/en-DE.json
Normal file
1
src/translations/en-DE.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
1
src/translations/en-US.json
Normal file
1
src/translations/en-US.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
@ -2,6 +2,12 @@ import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as braces from 'braces';
|
||||
|
||||
declare module 'braces' {
|
||||
interface Options {
|
||||
keepEscaping?: boolean; // Workaround for option not present in @types/braces 3.0.0
|
||||
}
|
||||
}
|
||||
|
||||
export function normalizeHomeDir(path: string): string {
|
||||
if (path.substring(0, 1) === '~') {
|
||||
return `${os.homedir()}/${path.substring(1)}`;
|
||||
@ -10,7 +16,7 @@ export function normalizeHomeDir(path: string): string {
|
||||
}
|
||||
|
||||
export function expandPattern(pattern: string): string[] {
|
||||
return braces(pattern, { expand: true });
|
||||
return braces(pattern, { expand: true, keepEscaping: true });
|
||||
}
|
||||
|
||||
export function normalizePaths(patterns: string[], defaultPatterns: string[] = []): string[] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user