Skip to content

Commit

Permalink
Merge pull request #488 from instantcommerce/fix/path-on-win
Browse files Browse the repository at this point in the history
fix: path separator on windows
  • Loading branch information
ggurkal committed Oct 20, 2022
2 parents 6258d15 + 89cf473 commit c4d4bdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/internals/getCallerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ export function getCallerInfo(): [directoryPath: string | undefined, fileName: s

const fileName = fileInfo[0].trim().split('/pages/api/');

return [join('/pages/api', dirname(fileName[fileName.length - 1])), basename(fileName[fileName.length - 1])];
return [
join('/pages/api', dirname(fileName[fileName.length - 1])).replace(/\\/g, '/'),
basename(fileName[fileName.length - 1])
];
}

0 comments on commit c4d4bdf

Please sign in to comment.