Skip to content

Commit

Permalink
fix(cli): custom tsconfig gets wrong path (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
Atrox authored and B4nan committed Aug 9, 2020
1 parent beffd4c commit 3cdb5dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/utils/ConfigurationLoader.ts
@@ -1,4 +1,5 @@
import { pathExists } from 'fs-extra';
import path from 'path';
import { IDatabaseDriver } from '../drivers';
import { Configuration } from './Configuration';
import { Utils } from './Utils';
Expand Down Expand Up @@ -56,7 +57,9 @@ export class ConfigurationLoader {
return paths;
}

static async registerTsNode(tsConfigPath = process.cwd() + '/tsconfig.json') {
static async registerTsNode(configPath = 'tsconfig.json') {
const tsConfigPath = path.join(process.cwd(), configPath);

// eslint-disable-next-line @typescript-eslint/no-var-requires
require('ts-node').register({ project: tsConfigPath });

Expand Down

0 comments on commit 3cdb5dd

Please sign in to comment.