Coder Social home page Coder Social logo

Comments (2)

mojibake-umd avatar mojibake-umd commented on July 25, 2024

let's just say the documentation is confusing at best...
I too have been running in circles this morning trying to cut my teeth on Quicksilver scripts...
The below finally worked for me 3minutes ago.
Using the standard Pantheon upstream for Drupal the following worked for me.
pantheon.yml
# Put overrides to your pantheon.upstream.yml file here.
api_version: 1
#quicksilver scripts
workflows:
deploy:
after:
- type: webphp
description: Drush Example
script: private/scripts/enable_dev_modules.php

I first placed in /files/private/scripts/ (403)
and then in /code/private/scripts/ (302)
it did not work until I placed in
/code/web/private/scripts
which would be in the "web" subdirectory of the site repo.

If you are using the default upstream, then maybe you do not need web_docroot: true (please verify)

from quicksilver-examples.

jigarius avatar jigarius commented on July 25, 2024

Findings

  • The terminus workflow:watch SITE says, script can't be found, check your path, but it doesn't make it clear as to where it looked for it.
    • Maybe in the --verbose mode it could help the user with additional information like, script not found at web/private/..., which could make it easier to debug the issue.
  • Turns out that when we write script: private/scripts/..., Pantheon looks for this path inside the web directory, which doesn't seem intuitive.

So, in my case, it works now because I placed the script under web/private/scripts/... and wrote the script: as private/scripts/... without the web/ in the beginning.

Suggestions

  • IMHO, the script: path/to/script.ext should look up the script from the project root and not the web root.
  • Also, such server-side scripts are usually placed above Drupal's document root for security reasons.
    • I'd suggest considering the documentation to suggest placing these scripts under some location like PROJECT/scripts/quicksilver/ so they stay above Drupal's document root.

I'll keep this open for now so that my suggestions are read by the maintainers.

from quicksilver-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.