mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Accept absolute paths in CliRunner
This commit is contained in:
@@ -5,7 +5,7 @@ import type { IComponentsManagerBuilderOptions, LogLevel } from 'componentsjs';
|
||||
import { ComponentsManager } from 'componentsjs';
|
||||
import yargs from 'yargs';
|
||||
import { getLoggerFor } from '../logging/LogUtil';
|
||||
import { joinFilePath, ensureTrailingSlash } from '../util/PathUtil';
|
||||
import { joinFilePath, ensureTrailingSlash, absoluteFilePath } from '../util/PathUtil';
|
||||
import type { Initializer } from './Initializer';
|
||||
|
||||
export class CliRunner {
|
||||
@@ -71,7 +71,7 @@ export class CliRunner {
|
||||
*/
|
||||
protected resolveFilePath(cwdPath?: string | null, modulePath = ''): string {
|
||||
return typeof cwdPath === 'string' ?
|
||||
joinFilePath(process.cwd(), cwdPath) :
|
||||
absoluteFilePath(cwdPath) :
|
||||
joinFilePath(__dirname, '../../', modulePath);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user