WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #52909, comment 6


Ignore:
Timestamp:
04/29/2021 02:22:38 PM (5 months ago)
Author:
jnylen0
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52909, comment 6

    initial v1  
    44> Oh, in that case, I believe that the whole command should be passed to the shell with `sh -c` or the second command should be prefaced with `docker-compose exec -T <container>` like:
    55
    6 This is correct. `execSync( 'docker-compose exec -T commandA && commandB' )` will effectively run two commands, `docker-compose exec -T commandA` and `commandB`, because the `&&` is interpreted as a command separator by the underlying shell, and never gets passed to `docker-compose`.
     6This is correct. `execSync( 'docker-compose exec -T php commandA && commandB' )` will effectively run two commands, `docker-compose exec -T commandA` and `commandB`, because the `&&` is interpreted as a command separator by the underlying shell, and never gets passed to `docker-compose`.
    77
    88Also it seems like this may not work in Windows if it is supposed to (`&&` is a Linux-ism). A good way to restructure this could be as follows (needs testing):