Lando: Assignment to constant variable line 41ish for pantheon.js

Created on 29 Sep 2018  路  3Comments  路  Source: lando/lando

There is an issue since RC1 when you try to init terminus command on a container , it looks like the pantheon recipe is always enabled which causes several issues

Example .lando.yml

name: terminus-test
services:
  terminus:
    type: php:7.0
    via: cli
    xdebug: false
    build:
    - "cd $HOME && curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install --install-dir=$HOME --bin-dir=/bin"
tooling:
  terminus:
    service: terminus

Now try to run:

 lando terminus auth:login --machine-token=$(MACHINE_TOKEN)

This results in error like this: https://www.screencast.com/t/kB7plEAPzWr

The only solution to pass this error is to use tooling example like this:

tooling:
  anything:
    service: terminus
    cmd: terminus

running the below works fine now:

 lando anything auth:login --machine-token=$(MACHINE_TOKEN)

I'm pretty sure that this relates to https://github.com/lando/lando/blob/85dc5ff0bb550842d88e85fd2b06970ac72f31ec/plugins/lando-recipes/recipes/pantheon/pantheon.js#L35-L52

I don't understand why the pantheon recipe though is executing while i have no reference to it in my yml

bug

Most helpful comment

This might be related:

  • After lando init github and entering my github token, I get the error "Assignment to constant variable."
    and
  • After running lando init and choosing a recipe (such as drupal 8 or lamp), I'm asked for a patheon token.

All 3 comments

@sameronline i dont think this is actually saying you have the pantheon recipe. I think this is just an es6 migration issue that is showing up when that file is being read.

We probably need to use let here instead of const
https://github.com/lando/lando/blob/85dc5ff0bb550842d88e85fd2b06970ac72f31ec/plugins/lando-recipes/recipes/pantheon/pantheon.js#L41

im updating the issue to reflect this

This might be related:

  • After lando init github and entering my github token, I get the error "Assignment to constant variable."
    and
  • After running lando init and choosing a recipe (such as drupal 8 or lamp), I'm asked for a patheon token.

This should be fixed in RC2

Was this page helpful?
0 / 5 - 0 ratings