Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to open stream: No such file or directory JSONCache.php:25 #2912

Closed
ghost opened this issue Aug 29, 2017 · 7 comments
Closed

failed to open stream: No such file or directory JSONCache.php:25 #2912

ghost opened this issue Aug 29, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Aug 29, 2017

[warning] file_put_contents(C:/Users/Administrator/.drush/cache/factory/Drush\Commands\ValidatorsCommands.cache): faile
d to open stream: No such file or directory JSONCache.php:25

drush:9.0.0-beta4
php:7.1.8
drupal:8.3.7

@weitzman weitzman changed the title faile d to open stream: No such file or directory JSONCache.php:25 failed to open stream: No such file or directory JSONCache.php:25 Sep 1, 2017
@newsec
Copy link

newsec commented Sep 28, 2017

Same errors after upgrading to 9.0.0-beta4.
Seems that Drush can't create subdirectories in "factory/Drush" directory in Windows environment.

@greg-1-anderson
Copy link
Member

Are the mixed directory separator types here perhaps the problem?

@newsec
Copy link

newsec commented Sep 30, 2017

Think so

@weitzman
Copy link
Member

weitzman commented Oct 1, 2017

I pushed a quick fix for this to 8.x and master. I didn't try on Windows so not 100% sure. Please post here if this fixes or does not fix the problem. I'll reopen if needed.

@weitzman weitzman closed this as completed Oct 1, 2017
weitzman added a commit that referenced this issue Oct 1, 2017
weitzman added a commit that referenced this issue Oct 1, 2017
@weitzman
Copy link
Member

weitzman commented Oct 1, 2017

My fix caused test fails, so reverted both branches. Someone needs to work on a better fix.

@newsec
Copy link

newsec commented Oct 1, 2017

drush_mkdir() function ensures only ".drush\cache\factory\Drush" path ($this->directory) and not path from $cid.
It works even with a mixed separator.

@weitzman
Copy link
Member

weitzman commented Oct 1, 2017

Pushed a different fix to 8.x and master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants