Skip to content

Commit

Permalink
fix(core-manager): resolve commands path (#4444)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastijankuzner authored Jul 16, 2021
1 parent 264d39a commit 87ee3b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-manager/src/utils/cli-manager.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Cli from "@arkecosystem/core-cli";
import { Container } from "@arkecosystem/core-kernel";
import { Identifiers } from "../ioc";
import { resolve } from "path";
import { dirname, join } from "path";

@Container.injectable()
export class CliManager {
Expand All @@ -28,6 +28,6 @@ export class CliManager {

private discoverCommands(): Cli.Contracts.CommandList {
const discoverer = this.cli.resolve(Cli.Commands.DiscoverCommands);
return discoverer.within(resolve("./dist/commands"));
return discoverer.within(join(dirname(require.resolve("@arkecosystem/core")), "commands"));
}
}

0 comments on commit 87ee3b5

Please sign in to comment.