src/Tasks.php
function pantheonInstall() {
    $admin_name = $this->projectProperties['admin_name'];
    $install_cmd = 'site-install ' . $this->projectProperties['install_profile'] . ' --account-name=' . $admin_name . ' -y';

    $terminus_site_env = $this->getPantheonSiteEnv();
    $install_cmd = "terminus remote:drush $terminus_site_env -- $install_cmd";
    // Pantheon wants the site in SFTP for installs.
    $this->_exec("terminus connection:set $terminus_site_env sftp");

    // Even in SFTP mode, the settings.php file might have too restrictive
    // permissions. We use SFTP to chmod the settings file before installing.
    $sftp_command = trim(exec("terminus connection:info --field=sftp_command $terminus_site_env"));
    $sftp_command = str_replace('sftp', 'sftp -b -', $sftp_command);
    // Use webroot to find settings.php assume  webroot is the gitroot if no
    // webroot is specified.
    if (getenv('TS_WEB_ROOT')) {
      $web_root = getenv('TS_WEB_ROOT') . '/';
    }
    else {
      $web_root = '';
    }
    $default_dir = 'code/' . $web_root . 'sites/default';
    // We use 755 instead of 644 so settings.php is executable, and the
    // directory is stat-able (otherwise we can't chmod the php file)
    $sftp_command .= ' << EOF
chmod 755 ' . $default_dir . '
chmod 755 ' . $default_dir . '/settings.php';
    // Note that we don't use $this->_exec on purpose. SFTP command fails
    // with that operation: a fix would be great but this actually works.
    exec($sftp_command);

    // Run the installation.
    $result = $this->taskExec($install_cmd)
      ->run();
    // Put the site back into git mode.
    $this->_exec("terminus connection:set $terminus_site_env git");

    if ($result->wasSuccessful()) {
      $this->say('Install complete');
    }

    return $result;
  }
function pantheonInstall() {
    $admin_name = $this->projectProperties['admin_name'];
    $install_cmd = 'site-install ' . $this->projectProperties['install_profile'] . ' --account-name=' . $admin_name . ' -y';

    $terminus_site_env = $this->getPantheonSiteEnv();
    $install_cmd = "terminus remote:drush $terminus_site_env -- $install_cmd";
    // Pantheon wants the site in SFTP for installs.
    $this->_exec("terminus connection:set $terminus_site_env sftp");

    // Even in SFTP mode, the settings.php file might have too restrictive
    // permissions. We use SFTP to chmod the settings file before installing.
    $sftp_command = trim(exec("terminus connection:info --field=sftp_command $terminus_site_env"));
    $sftp_command = str_replace('sftp', 'sftp -b -', $sftp_command);
    // Use webroot to find settings.php assume  webroot is the gitroot if no
    // webroot is specified.
    if (getenv('TS_WEB_ROOT')) {
      $web_root = getenv('TS_WEB_ROOT') . '/';
    }
    else {
      $web_root = '';
    }
    $default_dir = 'code/' . $web_root . 'sites/default';
    // We use 755 instead of 644 so settings.php is executable, and the
    // directory is stat-able (otherwise we can't chmod the php file)
    $sftp_command .= ' << EOF
chmod 755 ' . $default_dir . '
chmod 755 ' . $default_dir . '/settings.php';
    // Note that we don't use $this->_exec on purpose. SFTP command fails
    // with that operation: a fix would be great but this actually works.
    exec($sftp_command);

    // Run the installation.
    $result = $this->taskExec($install_cmd)
      ->run();
    // Put the site back into git mode.
    $this->_exec("terminus connection:set $terminus_site_env git");

    if ($result->wasSuccessful()) {
      $this->say('Install complete');
    }

    return $result;
  }
function pantheonInstall ( ) { $ admin_name = $ this -> projectProperties [ 'admin_name' ] ; $ install_cmd = 'site-install ' . $ this -> projectProperties [ 'install_profile' ] . ' --account-name=' . $ admin_name . ' -y' ; $ terminus_site_env = $ this -> getPantheonSiteEnv ( ) ; $ install_cmd = "terminus remote:drush $terminus_site_env -- $install_cmd" ; // Pantheon wants the site in SFTP for installs. $ this -> _exec ( "terminus connection:set $terminus_site_env sftp" ) ; // Even in SFTP mode, the settings.php file might have too restrictive // permissions. We use SFTP to chmod the settings file before installing. $ sftp_command = trim ( exec ( "terminus connection:info --field=sftp_command $terminus_site_env" ) ) ; $ sftp_command = str_replace ( 'sftp' , 'sftp -b -' , $ sftp_command ) ; // Use webroot to find settings.php assume  webroot is the gitroot if no // webroot is specified. if ( getenv ( 'TS_WEB_ROOT' ) ) { $ web_root = getenv ( 'TS_WEB_ROOT' ) . '/' ; } else { $ web_root = '' ; } $ default_dir = 'code/' . $ web_root . 'sites/default' ; // We use 755 instead of 644 so settings.php is executable, and the // directory is stat-able (otherwise we can't chmod the php file) $ sftp_command .= ' << EOF
chmod 755 ' . $ default_dir . '
chmod 755 ' . $ default_dir . '/settings.php' ; // Note that we don't use $this->_exec on purpose. SFTP command fails // with that operation: a fix would be great but this actually works. exec ( $ sftp_command ) ; // Run the installation. $ result = $ this -> taskExec ( $ install_cmd ) -> run ( ) ; // Put the site back into git mode. $ this -> _exec ( "terminus connection:set $terminus_site_env git" ) ; if ( $ result -> wasSuccessful ( ) ) { $ this -> say ( 'Install complete' ) ; } return $ result ; }
Install site on Pantheon.

@return \Robo\Result
Install site on Pantheon .