Skip to content

Commit a953e99

Browse files
author
monica.lopez-gris
committed
fix: security path dasherize
1 parent c06c9b6 commit a953e99

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

packages/schematics/src/lib/security/security.factory.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Path } from '@angular-devkit/core';
1+
import { Path, strings } from '@angular-devkit/core';
22
import { chain, Rule, Tree } from '@angular-devkit/schematics';
33
import { join } from 'path';
44
import { packagesVersion } from '../packagesVersion';
@@ -46,5 +46,11 @@ function updateMain(project: string | undefined): Rule {
4646
}
4747

4848
export function security(options: ISecurityInitializer): Rule {
49-
return chain([updatePackageJson(options.path), updateMain(options.path)]);
49+
return (): any => {
50+
if (!options.path) {
51+
options.path = '.';
52+
}
53+
options.path = strings.dasherize(options.path);
54+
return chain([updatePackageJson(options.path), updateMain(options.path)]);
55+
};
5056
}

0 commit comments

Comments
 (0)