Giter Club home page Giter Club logo

Comments (4)

tecbeast42 avatar tecbeast42 commented on September 15, 2024

okay i found the problem. We load env vars not from .env but through docker the extension assumes all default values which puts the project into production and it breaks because dusk is installed and loaded.

I am not really sure what to do here. Maybe it is possible to make it more docker friendly.

I might be able to run it if there were no " around the php command.
e.g.

docker run --rm laravel php artisan command

from vscode-laravel-artisan.

TheColorRed avatar TheColorRed commented on September 15, 2024

I am not familiar with docker, so I am not sure if this fix will work with docker projects or not, but I have added a config setting, artisan.docker.enabled (if you have a better setting name please let me know). This setting is best set within the project instead of globally.

So, in your .vscode/settings.json set "artisan.docker.enabled": true, and it should then run the command:

cmd = `docker run --rm "${cmd.replace(/"/g, '\\"')}"`

Please give this a try and let me know. Thanks!

laravel-artisan-0.0.24.vsix.zip

from vscode-laravel-artisan.

robsontenorio avatar robsontenorio commented on September 15, 2024

@TheColorRed This does not work, because some people use docker-compose. Instead of run a hardcoded command as you suggested, just let user place the custom command.

artisan.docker.enabled:  true
artisan.docker.command: <full command with path> 

Can you release a new patch?

from vscode-laravel-artisan.

robsontenorio avatar robsontenorio commented on September 15, 2024

@TheColorRed Just sent a PR ;)

from vscode-laravel-artisan.

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.