Skip to content

Commit

Permalink
Correct path build for windows (#917)
Browse files Browse the repository at this point in the history
Patch for comment on #810
  • Loading branch information
NateScarlet authored and JakeDawkins committed Jan 24, 2019
1 parent 5f32d2d commit 5050172
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/apollo/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export type GenerationOptions = CompilerOptions &
};

function toPath(uri: string): string {
return URI.parse(uri).path;
return URI.parse(uri).fsPath;
}

export default function generate(
Expand Down Expand Up @@ -163,7 +163,7 @@ export default function generate(
let dir = outputPath;
if (nextToSources) {
dir = path.join(
path.dirname(path.posix.relative(rootPath, toPath(sourcePath))),
path.dirname(path.relative(rootPath, toPath(sourcePath))),
dir
);
if (!fs.existsSync(dir)) {
Expand Down

0 comments on commit 5050172

Please sign in to comment.