Install Terminus Plugins In Lando

jcandan

James Candan

Posted on May 18, 2020

Install Terminus Plugins In Lando

Background

When you use Lando with Pantheon, and you want to install a Terminus plugin to your Lando local development environment, you'll want to go with something like the following.

Do it

services:
  appserver:
    build:
      - /bin/sh -c "[ -d /var/www/.terminus/plugins ] || mkdir -p /var/www/.terminus/plugins"
      - /bin/sh -c "[ -d /var/www/.terminus/plugins/terminus-secrets-plugin ] || composer create-project -d /var/www/.terminus/plugins pantheon-systems/terminus-secrets-plugin:~1"

Why this way?

This avoids an error:

Creating a "pantheon-systems/terminus-secrets-plugin:~1" project at "./terminus-build-tools-plugin"


  [InvalidArgumentException]                                                                
  Project directory "/var/www/.terminus/plugins/terminus-secrets-plugin" is not empty.

The problem is that it is trying to override already existing directory and files.

💖 💪 🙅 🚩
jcandan
James Candan

Posted on May 18, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related