Last active
August 4, 2022 11:04
-
-
Save twfahey1/235f3f0feaafea4c4bb7a03a3f4c9a50 to your computer and use it in GitHub Desktop.
Pantheon - run php-script (php eval alternative) via terminus against a site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat hello.php | terminus remote:wp ${SITE}.${ENV} -- eval-file - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat << 'EOF' | terminus drush site.env -- php-script - | |
echo PHP_VERSION; | |
EOF |
When will this command be supported in terminus 3? I see no error but also no output:
`acom-webmaster:/home/drews/2021/Drupal/acom-unity> cat example03.sh
cat << 'EOF' | t3 drush acom-unity.dev -- php-script -
print 456*789;
print "\n";
EOF
acom-webmaster:/home/drews/2021/Drupal/acom-unity> ./example03.sh
[warning] This environment is in read-only Git mode. If you want to make changes to the codebase of this site (e.g. updating modules or plugins), you will need to toggle into read/write SFTP mode first.
[notice] Command: acom-unity.dev -- drush php-script [Exit: 0]
acom-webmaster:/home/drews/2021/Drupal/acom-unity> t3 -V
Terminus 3.0.0-alpha
acom-webmaster:/home/drews/2021/Drupal/acom-unity>`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you so much for this Taylor! This was very helpful.