diff --git a/packages/@o3r/core/builders/lib-build/index.ts b/packages/@o3r/core/builders/lib-build/index.ts index 922b533eb1..d7e8b1db94 100644 --- a/packages/@o3r/core/builders/lib-build/index.ts +++ b/packages/@o3r/core/builders/lib-build/index.ts @@ -21,7 +21,7 @@ import { const libBuildOptions = ['target', 'skipJasmineFixtureWorkaround']; export default createBuilder(createBuilderWithMetricsIfInstalled(async (options, context): Promise => { - const specifiedRoot = context.target?.project && (await context.getProjectMetadata(context.target.project)).root?.toString(); + const specifiedRoot = context.target?.project && (await context.getProjectMetadata(context.target.project)).root as string; const ROOT_PATH = specifiedRoot ? path.resolve(context.workspaceRoot, specifiedRoot) : context.currentDirectory; const SRC_PATH = path.resolve(ROOT_PATH, 'src'); const SRC_PACKAGE_JSON = path.resolve(SRC_PATH, 'package.json'); diff --git a/packages/@o3r/core/builders/run-script/index.ts b/packages/@o3r/core/builders/run-script/index.ts index b20869c195..158b5d3469 100644 --- a/packages/@o3r/core/builders/run-script/index.ts +++ b/packages/@o3r/core/builders/run-script/index.ts @@ -23,7 +23,7 @@ import type { export default createBuilder(createBuilderWithMetricsIfInstalled(async (options, context): Promise => { context.reportRunning(); context.reportProgress(1, 1, `Running ${options.script} !!!`); - const specifiedRoot = context.target?.project && (await context.getProjectMetadata(context.target.project)).root?.toString(); + const specifiedRoot = context.target?.project && (await context.getProjectMetadata(context.target.project)).root as string; const projectRoot = specifiedRoot ? resolve(context.workspaceRoot, specifiedRoot) : context.currentDirectory; const angularJsonPath = join(context.workspaceRoot, 'angular.json');