From 67ce007b895671021af01b06689309932eb43da4 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Mon, 2 Oct 2023 10:25:53 -0600 Subject: [PATCH] fix: replace windows path separator with posix --- packages/amplify-codegen/src/utils/getRelativeTypesPath.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/amplify-codegen/src/utils/getRelativeTypesPath.js b/packages/amplify-codegen/src/utils/getRelativeTypesPath.js index 7d3f8cb5b..39aeec1f7 100644 --- a/packages/amplify-codegen/src/utils/getRelativeTypesPath.js +++ b/packages/amplify-codegen/src/utils/getRelativeTypesPath.js @@ -2,7 +2,10 @@ const path = require('path'); function getRelativeTypesPath(opsGenDirectory, generatedFileName) { if (generatedFileName) { - const relativePath = path.relative(opsGenDirectory, generatedFileName); + const relativePath = path + .relative(opsGenDirectory, generatedFileName) + .split(path.sep) + .join(path.posix.sep); // generatedFileName is in same directory as opsGenDirectory // i.e. generatedFileName: src/graphql/API.ts, opsGenDirectory: src/graphql