Skip to content

Commit

Permalink
Ensure cache diretory exists before using roadrunner (#1902)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze authored and bestander committed Nov 17, 2016
1 parent 75b65ee commit 4ce67f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions bin/yarn.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var mkdirp = require('mkdirp');
var constants = require('../lib-legacy/constants');
mkdirp.sync(constants.GLOBAL_INSTALL_DIRECTORY);
mkdirp.sync(constants.MODULE_CACHE_DIRECTORY);
var roadrunner = require('roadrunner');
roadrunner.load(constants.CACHE_FILENAME);
roadrunner.setup(constants.CACHE_FILENAME);
Expand Down
6 changes: 6 additions & 0 deletions end_to_end_tests/data/run-yarn-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ cd /tmp
mkdir yarntest
cd yarntest
echo {} > package.json

# Create the cache directory and remove it
# This simulates issue reported here: https://github.com/yarnpkg/yarn/issues/1724
yarn --version || fail_with_log
rm -rf ~/.cache/yarn

yarn add react || fail_with_log

0 comments on commit 4ce67f3

Please sign in to comment.