-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Composer create does not pass "--no-interaction" flag for "post-create-project-cmd" (Craft CMS) #6246
Comments
Tried a quick fix via Gitpod (https://ddev.readthedocs.io/en/stable/developers/building-contributing/#open-in-gitpod) for if !preserveFlags && composerManifest != nil && composerManifest.HasPostCreateProjectCmdScript() {
// Try to run post-create-project-cmd.
composerCmd = []string{
"composer",
"run-script",
}
// Apply args supported for run-script
supportedArgs := []string{
"--dev",
"--no-dev",
"-q",
"--quiet",
"--ansi",
"--no-ansi",
"-n",
"--no-interaction",
"--profile",
"--no-plugins",
"--no-scripts",
"-d",
"--working-dir",
"--no-cache",
"-v",
"-vv",
"-vvv",
"--verbose",
}
for _, osarg := range osargs {
for _, supportedArg := range supportedArgs {
if strings.HasPrefix(osarg, supportedArg) {
composerCmd = append(composerCmd, osarg)
}
}
}
composerCmd = append(composerCmd, "post-create-project-cmd") but got
for
🤔 |
@mandrasch, I have a fix for this issue in: |
@mandrasch This looks like the same class of problem I had with CakePHP (#6300) . |
@tyler36 thanks for information! 👍 I just realized that the problem also seemed to be that The official craft docs (https://craftcms.com/docs/5.x/install.html#quick-start) do not mention
I briefly tested the new awesome PR by Stas and both variants seem to work properly now without waiting for prompts 🎉
|
* docs: Warn about Codespaces (ddev#6321) [skip ci] Co-authored-by: Matthias Andrasch <[email protected]> * docs: Improve ddev debug test by offering suggestions early [skip ci] (ddev#6323) * feat: add support for MariaDB 11.4 LTS, fixes ddev#6061 (ddev#6243) Co-authored-by: Stanislav Zhuk <[email protected]> * docs: pacify textlint on mysql/https (ddev#6336) [skip ci] * docs: revisit WSL Docker Desktop setup instructions (ddev#6330) * fix: autodownload yarn from corepack, and set cache-folder, fixes ddev#6332 (ddev#6333) * docs: windows-wsl2-dd needs apt install for ngrok (ddev#6341) [skip ci] * build: check docker-compose 2.28.1 (ddev#6340) [skip ci] * fix: use real path to global config location, fixes ddev#6328 (ddev#6329) * test: stop running nightly tests [skip ci] (ddev#6347) * test: Improve reliability of TestProcessHooks (intermittent failures), fixes ddev#6313 (ddev#6314) * fix: Drupal 10 and Drupal 11 settings have migrated, set state_cache (ddev#6346) [skip ci] Co-authored-by: Stanislav Zhuk <[email protected]> * build: use IPv4 inside a container, mariadb-client 11.4 for the webserver (ddev#6334) [skip ci] * fix: pass all valid options to nested commands in `ddev composer create`, fixes ddev#6300, fixes ddev#6246, for ddev#5058 (ddev#6303) Co-authored-by: Randy Fay <[email protected]> Co-authored-by: Ralf Koller <[email protected]> * docs: fix up textlint complaints * Turn off defaultTerms * Use exclude properly with textlint for VS Code * update for additional textlint complaints * remove redundant empty exclude section * Try to get textlint/reviewdog to report --------- Co-authored-by: Matthias Andrasch <[email protected]> Co-authored-by: hussainweb <[email protected]> Co-authored-by: Stanislav Zhuk <[email protected]> Co-authored-by: Ralf Koller <[email protected]>
Preliminary checklist
ddev debug test
to include output belowOutput of
ddev debug test
Expand `ddev debug test` diagnostic information
https://gist.github.com/mandrasch/9c5093ae8407a877f0b3859ab7b3842dExpected Behavior
Craft CMS has the following (https://github.com/craftcms/craft/blob/5.x/composer.json)
post-create-project-cmd
:I want to run an install without interaction, therefore I want to use the following
ddev composer create -y --no-scripts --no-interaction craftcms/craft
with DDEV v.1.21.3 (since post-create-cmd is executed now)
Actual Behavior
Executing
ddev composer create -y --no-scripts --no-interaction craftcms/craft
get's stuck at this screen with a prompt:Console output:
Steps To Reproduce
--no-interaction
:Anything else?
@php craft setup/welcome
- ActionWelcome checks for if (!$this->interactive https://github.com/craftcms/cms/blob/5.x/src/console/controllers/SetupController.php#L168 --> and this is set here https://github.com/craftcms/cms/blob/c2f58dce722f79baa208b879f821f74960627a12/src/console/ControllerTrait.php#L171.So maybe this needs to be changed here in DDEV when
--no-interaction
is passed? 🤔 (just a guess)https://github.com/ddev/ddev/blob/70fc4cd7b8b84600c18f0435f2ca82f1dba8b730/cmd/ddev/cmd/composer-create.go#L284C36-L284C41
Or this https://github.com/ddev/ddev/blob/70fc4cd7b8b84600c18f0435f2ca82f1dba8b730/cmd/ddev/cmd/composer-create.go#L237C4-L244C1
needs to be appended to the second command to
as well (second guess).
ddev composer create
fully compatible withcomposer create-project
#5058). Wasn't executed before as far as I understand.The text was updated successfully, but these errors were encountered: