creditkarma / thrift-typescript

Generate TypeScript from Thrift IDL files
Apache License 2.0
155 stars 32 forks source link

there are some wrong when create dir in windows #98

Closed netren closed 6 years ago

netren commented 6 years ago

function mkdir(dirPath) { console.log("dirPath:" + dirPath + " " + path.sep);

var parts = dirPath.split(path.sep).filter((val) => val !== '');

// i add this code it can run in windows if (os.platform() === 'win32') { parts = parts.slice(1) } if (parts.length > 0 && path.isAbsolute(dirPath)) { createPath(parts, rootDir()); } else if (parts.length > 0) { createPath(parts, process.cwd()); } }