Giter Club home page Giter Club logo

Comments (8)

malikkotob avatar malikkotob commented on May 24, 2024 1

@grasmash, @geerlingguy, also ran into the same issue where using the <drush> syntax worked for me, and <exec> failed:

project > local:sync:

     [exec]  [error]  Unable to load class Drush\Sql\Sql
     [exec]  [error]  exception 'Drush\Sql\SqlException' with message 'Unable to find a matching SQL Class. Drush cannot find your database connection details.' in /usr/local/share/drush/commands/sql/sql.drush.inc:588
     [exec] Stack trace:
     [exec] #0 /usr/local/share/drush/commands/sql/sql.drush.inc(441): drush_sql_get_class()
     [exec] #1 [internal function]: drush_sql_drop()
     [exec] #2 /usr/local/share/drush/includes/command.inc(366): call_user_func_array('drush_sql_drop', Array)
     [exec] #3 /usr/local/share/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array)
     [exec] #4 [internal function]: drush_command()
     [exec] #5 /usr/local/share/drush/includes/command.inc(185): call_user_func_array('drush_command', Array)
     [exec] #6 /usr/local/share/drush/lib/Drush/Boot/BaseBoot.php(73): drush_dispatch(Array)
     [exec] #7 /usr/local/share/drush/includes/preflight.inc(88): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
     [exec] #8 /usr/local/share/drush/drush.php(12): drush_main()
     [exec] #9 {main}
     [exec]  [error]  Error: no alias record could be found for source @.test
     [exec]  [notice] 'drush' cache was cleared.
     [exec]  [error]  Command cache-rebuild needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.
     [exec]  [error]  Command cache-rebuild requires Drupal core version 8+ to run.
     [exec]  [error]  The drush command 'cache-rebuild' could not be executed.

from blt.

danepowell avatar danepowell commented on May 24, 2024

Agreed that not all projects might use features and/or config imports... however I think we need a more sustainable solution than just commenting them out. Maybe the local targets should only exist in build/custom

from blt.

grasmash avatar grasmash commented on May 24, 2024

@geerlingguy Given the tasks use ${drush.cmd} which is expanded to ${drush.bin} @${drush.aliases.local} -r ${docroot} -l ${multisite.name}. I'd be happy to switch to using , but I don't understand what would be different about how it called drush. Can you explain?

Usage of drush fra is fairly innocuous given that it won't cause the command to fail if features is not present. The config-import call, however, does cause failure. Perhaps we can check for the existence of the partial directory prior to running it? Where exactly is the partial dir supposed to be? In $conf['config_directory'] . '/partial'; ?

from blt.

danepowell avatar danepowell commented on May 24, 2024

I'm not familiar with a "partial" directory. config-import does require that the directory config/default be present, which it is in Bolt (it's empty except for a README file). It should be harmless as-is.

from blt.

damontgomery avatar damontgomery commented on May 24, 2024

I'm actually encountering the opposite issue. I can use the exec commands once I set build.yml drush:cmd to remove -r.

When running BLT on the drush commands, since it doesn't support a directory option, all the commands run outside of docroot and drush cannot find anything. Solution seems to be to either use exec where we can specify the directory or extend the DrushTask to support the directory option.

from blt.

grasmash avatar grasmash commented on May 24, 2024

#276 may have resolved the drush.root issues.

from blt.

grasmash avatar grasmash commented on May 24, 2024

@geerlingguy Is this still an issue? There have been a number of changes to BLT that may have resolved this.

from blt.

geerlingguy avatar geerlingguy commented on May 24, 2024

@grasmash - https://github.com/acquia/blt/blob/8.x/phing/tasks/local-sync.xml still uses exec/command instead of drush/command, so the original issue still stands. It's not a functional problem, just a 'it seems like it would be cleaner to use drush in phing instead of exec' kind of thing.

from blt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.