diff --git a/src/index.ts b/src/index.ts index ad58a2f..db5f168 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import * as path from 'path'; import { LinkAlreadyExists } from './errors/chain/link-already-exists'; import { NoLinkFound } from './errors/chain/no-link'; import { NoChainLoaded } from './errors/chainfile/no-chain-loaded'; @@ -13,7 +14,7 @@ class Chainson { private chain: Chainfile | undefined; constructor(chainLocation = 'chainfile', output = 'NORMAL') { - this.chainLocation = chainLocation + '.json'; + this.chainLocation = path.join(chainLocation + '.json'); this.output = output; this.init(); this.chainQueue = new ChainQueue(this.chainLocation);