WordPress / theme-experiments

Experimenting with themes made out of blocks.
GNU General Public License v2.0
549 stars 183 forks source link

New empty theme : Fatal error Uncaught UnexpectedValueException #291

Closed MarieComet closed 2 years ago

MarieComet commented 2 years ago

Hi When I run php new-empty-theme.php, I've got a Fatal Error :

marie@marie-comet:/media/sites/wp/wp-content/themes$ php new-empty-theme.php
Please provide the following information: 
Theme name: Comet 2022
Description: Marie Comet 2022 Theme
Author: Marie Comet
Theme URI: https://mariecomet.fr
PHP Fatal error:  Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(emptytheme/): failed to open dir: No such file or directory in /media/sites/wp/wp-content/themes/new-empty-theme.php:64
Stack trace:
#0 /media/sites/wp/wp-content/themes/new-empty-theme.php(64): RecursiveDirectoryIterator->__construct()
#1 /media/sites/wp/wp-content/themes/new-empty-theme.php(23): Generate_Theme->create_folder()
#2 /media/sites/wp/wp-content/themes/new-empty-theme.php(217): Generate_Theme->__construct()
#3 {main}
  thrown in /media/sites/wp/wp-content/themes/new-empty-theme.php on line 64

comet2022 folder is created in wp-content/themes, but is empty.

MarieComet commented 2 years ago

My bad, I have to clone the entire repository, not just the new-empty-theme.php file.

git clone https://github.com/WordPress/theme-experiments
cd theme-experiments
php new-empty-theme.php