Skip to content

Commit

Permalink
ignore failures when realpath-ing
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 10, 2019
1 parent 68a9d47 commit 99b212b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/jest-config/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,14 @@ const normalizeRootDir = (options: InitialOptions): InitialOptions => {
` Configuration option ${chalk.bold('rootDir')} must be specified.`,
);
}
options.rootDir = realpath(path.normalize(options.rootDir));
options.rootDir = path.normalize(options.rootDir);

try {
options.rootDir = realpath(options.rootDir);
} catch (e) {
// ignored
}

return options;
};

Expand Down Expand Up @@ -443,7 +450,11 @@ export default function normalize(options: InitialOptions, argv: Argv) {
DefaultOptions & ProjectConfig & GlobalConfig,
> = (Object.assign({}, DEFAULT_CONFIG): any);

newOptions.cwd = realpath(newOptions.cwd);
try {
newOptions.cwd = realpath(newOptions.cwd);
} catch (e) {
// ignored
}

if (options.resolver) {
newOptions.resolver = resolve(null, {
Expand Down

0 comments on commit 99b212b

Please sign in to comment.