{"action":"created","issue":{"url":"https://api.github.com/repos/lando/lando/issues/904","repository_url":"https://api.github.com/repos/lando/lando","labels_url":"https://api.github.com/repos/lando/lando/issues/904/labels{/name}","comments_url":"https://api.github.com/repos/lando/lando/issues/904/comments","events_url":"https://api.github.com/repos/lando/lando/issues/904/events","html_url":"https://github.com/lando/lando/issues/904","id":315535501,"node_id":"MDU6SXNzdWUzMTU1MzU1MDE=","number":904,"title":"Cannot trigger lando commands in a git hook","user":{"login":"drupov","id":1836325,"node_id":"MDQ6VXNlcjE4MzYzMjU=","avatar_url":"https://avatars3.githubusercontent.com/u/1836325?v=4","gravatar_id":"","url":"https://api.github.com/users/drupov","html_url":"https://github.com/drupov","followers_url":"https://api.github.com/users/drupov/followers","following_url":"https://api.github.com/users/drupov/following{/other_user}","gists_url":"https://api.github.com/users/drupov/gists{/gist_id}","starred_url":"https://api.github.com/users/drupov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupov/subscriptions","organizations_url":"https://api.github.com/users/drupov/orgs","repos_url":"https://api.github.com/users/drupov/repos","events_url":"https://api.github.com/users/drupov/events{/privacy}","received_events_url":"https://api.github.com/users/drupov/received_events","type":"User","site_admin":false},"labels":[{"id":871325219,"node_id":"MDU6TGFiZWw4NzEzMjUyMTk=","url":"https://api.github.com/repos/lando/lando/labels/support%20request","name":"support request","color":"8ee85a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-04-18T15:40:49Z","updated_at":"2018-07-06T13:58:17Z","closed_at":null,"author_association":"NONE","body":"It's not possible for me to trigger any lando command, when called from a git hook.\r\n\r\nI have a very basic .lando file:\r\n```\r\nname: test\r\nrecipe: drupal7\r\nconfig:\r\n  webroot: www\r\n```\r\n\r\nand a single pre-commit hook like this\r\n```\r\n05:31:12 {master} ~/Desktop/test$ cat .git/hooks/pre-commit\r\n#!/bin/bash\r\n\r\necho \"Output of 'lando'\"\r\nlando -- -v\r\n\r\necho \"Output of 'lando drush'\"\r\nlando drush -- -v\r\n```\r\n\r\nI run `lando start` then add any file change and execute\r\n```\r\n05:32:18 {master} ~/Desktop/test$ git add .\r\n05:32:25 {master} ~/Desktop/test$ git commit\r\n\r\nOutput of 'lando'\r\ninfo: Bootstraping...\r\ninfo: Configuring app plugin\r\ninfo: Configuring engine plugin\r\ninfo: Configuring proxy plugin\r\ninfo: Initializing proxy plugin\r\ninfo: Configuring services plugin\r\ninfo: Initializing app plugin\r\ninfo: Initializing engine plugin\r\ninfo: Initializing events\r\ninfo: Initializing init framework\r\ninfo: Initializing recipes plugin\r\ninfo: Initializing services\r\ninfo: Initializing tooling plugin\r\ninfo: Initializing core plugin\r\ninfo: Bootstrap completed.\r\ninfo: Initializing cli\r\ninfo: App test is ready!\r\nUsage: lando <command> [args] [options] [-- global options]\r\n\r\nCommands:\r\n  composer                 Run composer commands\r\n  config                   Display the lando configuration\r\n  db-export [file]         Export a database. Resulting file: {DB_NAME}.TIMESTAMP.gz\r\n  db-import [file]         Import into database.\r\n  destroy [appname]        Destroy app in current directory or [appname]\r\n  drush                    Run drush commands\r\n  info [appname]           Prints info about app in current directory or [appname]\r\n  init [method]            Initialize a lando app, optional methods: github, pantheon\r\n  list                     List all lando apps\r\n  logs [appname]           Get logs for app in current directory or [appname]\r\n  mysql                    Drop into a MySQL shell\r\n  php                      Run php commands\r\n  poweroff                 Spin down all lando related containers\r\n  rebuild [appname]        Rebuilds app in current directory or [appname]\r\n  restart [appname]        Restarts app in current directory or [appname]\r\n  share [appname]          Get a publicly available url\r\n  ssh [appname] [service]  SSH into [service] in current app directory or [appname]\r\n  start [appname]          Start app in current directory or [appname]\r\n  stop [appname]           Stops app in current directory or [appname]\r\n  version                  Display the lando version\r\n\r\nGlobal Options:\r\n  --help, -h  Show help\r\n  --verbose, -v, -vv, -vvv, -vvvv  Change verbosity of output\r\n\r\nUnknown argument: -v\r\nOutput of 'lando drush'\r\ninfo: Bootstraping...\r\ninfo: Configuring app plugin\r\ninfo: Configuring engine plugin\r\ninfo: Configuring proxy plugin\r\ninfo: Initializing proxy plugin\r\ninfo: Configuring services plugin\r\ninfo: Initializing app plugin\r\ninfo: Initializing engine plugin\r\ninfo: Initializing events\r\ninfo: Initializing init framework\r\ninfo: Initializing recipes plugin\r\ninfo: Initializing services\r\ninfo: Initializing tooling plugin\r\ninfo: Initializing core plugin\r\ninfo: Bootstrap completed.\r\ninfo: Initializing cli\r\ninfo: App test is ready!\r\n```\r\n\r\nI've added a screenshot for better visibility.\r\n\r\n![selection_304](https://user-images.githubusercontent.com/1836325/38942475-27197048-432f-11e8-9573-d0ce8073ad03.jpg)\r\n\r\nThis is a very simplified example, the main point is that my projects' setup I cannot execute a script on pre-commit that is available only inside the container, so I need the lando prefix for it.\r\n\r\nThanks for any help!"},"comment":{"url":"https://api.github.com/repos/lando/lando/issues/comments/403042330","html_url":"https://github.com/lando/lando/issues/904#issuecomment-403042330","issue_url":"https://api.github.com/repos/lando/lando/issues/904","id":403042330,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzA0MjMzMA==","user":{"login":"dustinleblanc","id":3948808,"node_id":"MDQ6VXNlcjM5NDg4MDg=","avatar_url":"https://avatars3.githubusercontent.com/u/3948808?v=4","gravatar_id":"","url":"https://api.github.com/users/dustinleblanc","html_url":"https://github.com/dustinleblanc","followers_url":"https://api.github.com/users/dustinleblanc/followers","following_url":"https://api.github.com/users/dustinleblanc/following{/other_user}","gists_url":"https://api.github.com/users/dustinleblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/dustinleblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustinleblanc/subscriptions","organizations_url":"https://api.github.com/users/dustinleblanc/orgs","repos_url":"https://api.github.com/users/dustinleblanc/repos","events_url":"https://api.github.com/users/dustinleblanc/events{/privacy}","received_events_url":"https://api.github.com/users/dustinleblanc/received_events","type":"User","site_admin":false},"created_at":"2018-07-06T13:58:17Z","updated_at":"2018-07-06T13:58:17Z","author_association":"COLLABORATOR","body":"I'm guessing you simply can't consume the output of the Docker container, but I am not sure."}}
{"actor":{"display_login":"dustinleblanc"}}