DEV Community

James Candan
James Candan

Posted on

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.

Top comments (1)

Collapse
 
thisdotmedia_staff profile image
This Dot Media

Nice tip James!