Skip to content

Commit b729fed

Browse files
author
Craigory Coppola
committed
fix(core): output paths still use windows separator on linux / mac
1 parent fa8f507 commit b729fed

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.releaserc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
{
3838
publishCmd: [
3939
'yarn ts-node tools/scripts/publish-all ${nextRelease.version} ${nextRelease.channel}',
40-
],
40+
].join(' && '),
4141
},
4242
],
4343
[

packages/core/src/generators/utils/generate-project.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe('nx-dotnet project generator', () => {
7272
expect(outputPath).toBeTruthy();
7373

7474
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
75-
const absoluteDistPath = resolve(resolve(config.root, outputPath));
75+
const absoluteDistPath = resolve(config.root, outputPath);
7676
const expectedDistPath = resolve('./dist/test');
7777

7878
expect(absoluteDistPath).toEqual(expectedDistPath);

packages/core/src/generators/utils/generate-project.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,14 @@ function SetOutputPath(
138138
readFileSync(projectFilePath).toString()
139139
);
140140

141+
let outputPath = `${relative(
142+
dirname(projectFilePath),
143+
process.cwd()
144+
)}/dist/${projectName}`;
145+
outputPath = outputPath.replace('\\', '/'); // Forward slash works on windows, backslash does not work on mac/linux
146+
141147
const textNode: Partial<XmlTextNode> = {
142-
text: `${relative(
143-
dirname(projectFilePath),
144-
process.cwd()
145-
)}\\dist\\${projectName}`,
148+
text: outputPath,
146149
type: 'text',
147150
};
148151
textNode.toString = () => textNode.text ?? '';

0 commit comments

Comments
 (0)