Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ RUN \
# Also write yarn to the default-packages file to be installed with nvm
. "$HOME"/.profile && echo "yarn" > "$NVM_DIR"/default-packages

RUN mkdir -p /home/docker/.drush/config
COPY ./home/docker/.drush/config/drush.yml /home/docker/.drush/config

ENV PATH=$PATH:/var/www/vendor/bin
# IMPORTANT! Switching back to the root user as the last instruction.
USER root
7 changes: 7 additions & 0 deletions src/home/docker/.drush/config/drush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sql:
cli:
options:
extra: '--skip-ssl'
query:
options:
extra: '--skip-ssl'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -name "Dockerfile*" -type f | head -20

Repository: phase2/docker-cli

Length of output: 77


🏁 Script executed:

cat -n ./src/Dockerfile

Repository: phase2/docker-cli

Length of output: 4257


🏁 Script executed:

find . -name "*.env*" -o -name "*.yml" -o -name "Makefile" -o -name "docker-compose*" | grep -v node_modules | head -20

Repository: phase2/docker-cli

Length of output: 150


🏁 Script executed:

cat -n ./.github/workflows/default.yml

Repository: phase2/docker-cli

Length of output: 3407


🌐 Web query:

Drush config search paths site directory

💡 Result:

Drush’s own configuration files (drush.yml) are discovered in this order (highest precedence first):

  1. Drupal site folder: sites/<site>/drush.yml (e.g. sites/default/drush.yml)
  2. sites/all/drush, WEBROOT/drush, or PROJECTROOT/drush
  3. Anywhere you point to with --config
  4. User config: ~/.drush/drush.yml
  5. System-wide: /etc/drush/drush.yml (or C:\ProgramData\Drush\drush.yml) [1]

To add extra config search paths, put this in a discovered drush.yml (e.g. sites/default/drush.yml):

drush:
  paths:
    config:
      - ${env.HOME}/.drush/config/drush.yml

(Entries may be a file path or a directory containing drush.yml.) [2]

To see exactly what Drush loaded, run:

  • drush status --fields=drush-conf [1]
  • drush status --fields=drush-conf --format=yaml [2]

If you meant Drupal config sync import/export paths (used by drush cim/cex), those come from the site’s $config_directories['sync'] in sites/<site>/settings.php, or you can override per command with drush cim --source=/path and drush cex --destination=/path. [3] [4]


🌐 Web query:

Drush sql command options extra configuration key schema

💡 Result:

In Drush, --extra is a common option on the sql:* commands that lets you append raw flags to the underlying DB client “connect string” (e.g., mysql / psql invocation). For example: drush sql:cli --extra=--skip-column-names. [1]

Command-line options (examples)

  • drush sql:cli --extra=EXTRA (open SQL CLI) [1]
  • drush sql:connect --extra=EXTRA (print a connection command) [2]
  • drush sql:query --extra=EXTRA (run a query) [3]
  • drush sql:drop --extra=EXTRA (drop all tables) [4]

Related: sql:sync also has --extra-dump (passes options to mysqldump or equivalent), plus table-selection options like --structure-tables-key, --skip-tables-key, etc. [5]

Drush YAML configuration “schema” (key path) for extra

To persist the same option via config (e.g., drush.yml or an alias file), set it under command-specific options like this: [6]

command:
  sql:
    cli:
      options:
        extra: "--auto-rehash"

Similarly, you can preconfigure other sql command options (example shown for sql:dump): [6]

command:
  sql:
    dump:
      options:
        structure-tables-key: common

Where the table-key lists live (non-options)

If you use --structure-tables-key=common, --skip-tables-key=common, etc., the actual lists are configured under the top-level sql: section (not under command:), e.g. sql: structure-tables: common: ... and sql: skip-tables: common: .... [6]

Sources: Drush command docs and configuration docs. [1][2][3][4][5][6]


🏁 Script executed:

cat -n ./src/home/docker/.drush/config/drush.yml

Repository: phase2/docker-cli

Length of output: 222


Fix Drush config path and schema: file won't be loaded and keys are incorrect.

The config file at /home/docker/.drush/config/drush.yml is not discoverable by Drush's default search paths (which include ~/.drush/drush.yml, /etc/drush/drush.yml, and project-root paths, but not ~/.drush/config/). Additionally, the YAML structure is missing the required command: prefix—it should be under command: sql: not just sql:.

Either move the file to ~/.drush/drush.yml and fix the schema:

command:
  sql:
    cli:
      options:
        extra: '--skip-ssl'
    query:
      options:
        extra: '--skip-ssl'

or add an explicit config path reference in a discovered drush.yml.

🤖 Prompt for AI Agents
In `@src/home/docker/.drush/config/drush.yml` around lines 1 - 7, The Drush YAML
config uses the wrong schema and isn't in a discoverable location: update the
drush.yml content to nest sql under the required top-level command key (i.e.,
make the root key "command:" with "sql:" beneath it and preserve the cli/query
options), and ensure the drush.yml file is placed where Drush will load it or
add an explicit config path entry in an already-discovered drush.yml so Drush
reads this configuration.

Loading