mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[precommit hook] resolve relative file paths from cwd (#52157)
This commit is contained in:
parent
3c55e55b7a
commit
8122b8b908
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue