Skip to content

Commit

Permalink
fix(state/paths): converts root directory path to absolute, if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rafamel committed Apr 24, 2019
1 parent 9fb9ddf commit aad9f6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/state/paths/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export default async function paths(opts: IPathsOpts): Promise<IPaths> {
await load(self);

// has to to called after load to wait for scope options to modify state
const rootDir = state.get('root');
let rootDir = state.get('root');
if (rootDir && !path.isAbsolute(rootDir)) {
rootDir = path.join(self.directory, rootDir);
}

const root =
rootDir === null
? null
Expand Down

0 comments on commit aad9f6e

Please sign in to comment.