From 01bca4116884bb93190d18dcdba244d3c9eac73c Mon Sep 17 00:00:00 2001 From: Hans Date: Tue, 9 Aug 2016 09:36:37 -0700 Subject: [PATCH] fix: allow users to pass in absolute paths to ngc (#10572) --- tools/@angular/tsc-wrapped/src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/@angular/tsc-wrapped/src/main.ts b/tools/@angular/tsc-wrapped/src/main.ts index b943be8c34..73104d8ff3 100644 --- a/tools/@angular/tsc-wrapped/src/main.ts +++ b/tools/@angular/tsc-wrapped/src/main.ts @@ -16,8 +16,9 @@ export function main(project: string, basePath?: string, codegen?: CodegenExtens if (fs.lstatSync(project).isFile()) { projectDir = path.dirname(project); } + // file names in tsconfig are resolved relative to this absolute path - basePath = path.join(process.cwd(), basePath || projectDir); + basePath = path.resolve(process.cwd(), basePath || projectDir); // read the configuration options from wherever you store them const {parsed, ngOptions} = tsc.readConfiguration(project, basePath);