Comments (8)
@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.
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.
@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.
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.
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.
#276 may have resolved the drush.root issues.
from blt.
@geerlingguy Is this still an issue? There have been a number of changes to BLT that may have resolved this.
from blt.
@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)
- BLT-5202: Guzzle 7 Breaks Run-server Command
- BLT-5206: Remove cache.php, no longer needed for drush HOT 5
- BLT-5207: BLT excludes drush/Commands/custom
- BLT-5208: Replace abandoned composer package 'webmozart/path-util'
- BLT-5209: [info] Waiting for non-50x response from http://localhost:9222... HOT 4
- BLT-5211: acquia blt documentation is outdated, causing crashes and installation issues HOT 6
- BLT-5213: local.settings.php is not detecting on Acquia cloud IDE. HOT 1
- BLT-5215: UserConfig Class not found HOT 3
- BLT-5216: drupal:sync:default:site requires --no-interaction during ci on pipelines HOT 1
- BLT-5217: Undefined array key "bootstrap" for Inspector when Drupal is not installed
- drupal:sync:default:site and ckeditor 4 removal and other updb issues HOT 3
- Drush Launcher busted with Drush 12 HOT 6
- Additional logging during drupal:update command
- BLT-5223: BLT build starts failing after upgrade to 13.7 with Drush 12.1 HOT 1
- BLT-5224: Add back PHP code sniffing in pre-commit hook HOT 2
- Respect PHP and Drupal error logging HOT 1
- BLT-5228: test issue
- BLT-5229: How to hook into artifact:build when using deploy command
- BLT-5231: Update assertion handling to remove use of deprecated class HOT 1
- Announcing BLT’s End of Life HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blt.