From 8122b8b9080980df658195eff4d9ccebbce06eae Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 5 Dec 2019 09:08:01 -0700 Subject: [PATCH] [precommit hook] resolve relative file paths from cwd (#52157) --- src/dev/file.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dev/file.ts b/src/dev/file.ts index 5dc66016e1e55..29e7cdc966909 100644 --- a/src/dev/file.ts +++ b/src/dev/file.ts @@ -19,8 +19,6 @@ import { dirname, extname, join, relative, resolve, sep } from 'path'; -import { REPO_ROOT } from './constants'; - export class File { private path: string; private relativePath: string; @@ -28,7 +26,7 @@ export class File { constructor(path: string) { this.path = resolve(path); - this.relativePath = relative(REPO_ROOT, this.path); + this.relativePath = relative(process.cwd(), this.path); this.ext = extname(this.path); }