Skip to content

Commit

Permalink
Revert path.posix changes
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Nov 14, 2022
1 parent 7539f51 commit 78c3ddb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion code/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
const os = require('os');

// TODO Revisit this test later, when we have a windows machine @valentinpalkovic
/**
* TODO: Some windows related tasks are still commented out, because they are behaving differently on
* a local Windows machine compared to the Windows Server 2022 machine running in GitHub Actions.
* The main issue is that path.sep is behaving differently on the two machines. Some more investagations
* are necessary!
* */
const skipOnWindows = [
'lib/core-server/src/utils/__tests__/server-statics.test.ts',
'lib/core-common/src/utils/__tests__/template.test.ts',
Expand Down
12 changes: 6 additions & 6 deletions code/lib/cli/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ export async function copyComponents(
};
const componentsPath = async () => {
const baseDir = getRendererDir(renderer);
const assetsDir = posix.join(baseDir, 'template/cli');
const assetsDir = path.join(baseDir, 'template/cli');

const assetsLanguage = posix.join(assetsDir, languageFolderMapping[language]);
const assetsJS = posix.join(assetsDir, languageFolderMapping[SupportedLanguage.JAVASCRIPT]);
const assetsTSLegacy = posix.join(
const assetsLanguage = path.join(assetsDir, languageFolderMapping[language]);
const assetsJS = path.join(assetsDir, languageFolderMapping[SupportedLanguage.JAVASCRIPT]);
const assetsTSLegacy = path.join(
assetsDir,
languageFolderMapping[SupportedLanguage.TYPESCRIPT_LEGACY]
);
const assetsTS = posix.join(assetsDir, languageFolderMapping[SupportedLanguage.TYPESCRIPT]);
const assetsTS = path.join(assetsDir, languageFolderMapping[SupportedLanguage.TYPESCRIPT]);

if (await fse.pathExists(assetsLanguage)) {
return assetsLanguage;
Expand Down Expand Up @@ -233,7 +233,7 @@ export async function copyComponents(
};

const destinationPath = await targetPath();
await fse.copy(posix.join(getCliDir(), 'rendererAssets/common'), destinationPath, {
await fse.copy(path.join(getCliDir(), 'rendererAssets/common'), destinationPath, {
overwrite: true,
});
await fse.copy(await componentsPath(), destinationPath, { overwrite: true });
Expand Down

0 comments on commit 78c3ddb

Please sign in to comment.