Lacking environment variables on project initialization causes bootstrapping problems

The problem

When you call make init-project-drupal, you need to have already bootstrapped Drumkit so that mustache will be available on the user's PATH. But: the init-project-drupal target itself creates a bootstrap script that creates a COMPOSER_CACHE_DIR environment variable, which won't be in place until you bootstrap Drumkit again. Without that environment variable, make build will fail.

Possible solutions

  1. Have init-project-drupal account for this by setting a COMPOSER_CACHE_DIR to a default value in the user's shell somehow, if it's not set.
  2. Modify make build to allow it to ignore the absence of this environment variable, or maybe use a default if it's not set.
  3. Generally: solve the unsolvable problem of setting env vars in the calling shell, or explicitly spit out documentation at the end of the Drumkit install.
  4. Have a $(MUSTACHE) var that points to the mustache path (.mk/.local/bin/mustache), because the path itself is the problem, not installing mustache (which we accomplish already by depending on mustache from other init targets that need it). Use $(MUSTACHE) like $(MAKE), etc.

We (@sensespidey @lamech) like option 4. Presumably, we could also take a similar approach for other Drumkit dependencies that init targets rely on.

Assignee Loading
Time tracking Loading