fabiospampinato / vscode-terminals

An extension for setting-up multiple terminals at once, or just running some commands.
MIT License
121 stars 19 forks source link

start a new python virtual environment and run commands #50

Closed kshishir closed 3 years ago

kshishir commented 3 years ago

I am trying to start a new python virtual env for my backend flask app. The second command does not run. Is there a way to run the command in the new shell. Here is my terminal config:

{
        "name": "python-flask-start", 
        "description": "local python flask start",
        "cwd": "backend",
        "commands": [
          "pipenv shell",
          "python flask.py"
        ]
      }
fabiospampinato commented 3 years ago

This extension isn't really able to handle that use case, and I'm not sure it could support it without breaking other things.

You should try to modify the "pipenv shell" command to execute a command directly, maybe it has a "-c" option that allows you to specify the command directly or something.