Merge pull request #6193 from backstage/freben/slasher
Fix `catalog:write` on windows systems
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Fix `catalog:write` on windows systems
|
||||
@@ -37,6 +37,7 @@ describe('catalog:write', () => {
|
||||
output: jest.fn(),
|
||||
createTemporaryDirectory: jest.fn(),
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetAllMocks();
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import { createTemplateAction } from '../../createTemplateAction';
|
||||
import * as yaml from 'yaml';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
@@ -41,7 +42,7 @@ export function createCatalogWriteAction() {
|
||||
const { entity } = ctx.input;
|
||||
|
||||
await fs.writeFile(
|
||||
`${ctx.workspacePath}/catalog-info.yaml`,
|
||||
resolvePath(ctx.workspacePath, 'catalog-info.yaml'),
|
||||
yaml.stringify(entity),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user