Skip to content

gdev create fails if theme arg empty or defined theme has missing directories #43

@mtws

Description

@mtws

When running the gdev create wizard and not defining a theme repo gdev create will fail.
Example of gdev create output when living the theme repo empty:

------------------------= Confirm input =------------------------
sitename: dp2017Demo
type: wordpress
components: dustpress
theme:
npm_install: false
run_seed: false
stage:
production:
git:
-----= Enter Y to create project, something else to cancel =-----

Y

Creating project dp2017Demo...

...

Cloning theme from ...
fatal: repository 'dp2017Demo/web/app/themes/dp2017Demo' does not exist

Removing .git directory from theme...

...

Replacing 'THEMENAME' strings from all project files with 'dp2017Demo'...
/usr/local/bin/gdev:559:in `read': No such file or directory - dp2017Demo/web/app/themes/dp2017Demo/lib/extras.php (Errno::ENOENT)
	from /usr/local/bin/gdev:559:in `block in create_app'
	from /usr/local/bin/gdev:558:in `each'
	from /usr/local/bin/gdev:558:in `create_app'
	from /usr/local/bin/gdev:794:in `create_wizard'
	from /usr/local/bin/gdev:491:in `create'
	from /usr/local/bin/gdev:54:in `initialize'
	from /usr/local/bin/gdev:867:in `new'
	from /usr/local/bin/gdev:867:in `<main>'

gdev create will also fail with the above output if a theme repo has been defined but the theme does not include some of the following files:

  • /lib/extras.php
  • /lib/images.php
  • /lib/setup.php
  • /package.json
  • /style.css"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions