Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.8k stars 320 forks source link

VSCode Extension: Add "Start if not running" command #607

Open JustinGrote opened 3 years ago

JustinGrote commented 3 years ago

I often make a dependent task for Azurite for my testing and launch tasks like so:

        {
            "label": "azurite",
            "command": "${command:azurite.start}",
            "problemMatcher": [],
            "isBackground": true
        },

However this always throws a bunch of toast errors if Azurite is already running. If I had a azurite.startifnotrunning command that would suppress error notifications about it already being started and only show errors if it failed would be very helpful. Thanks!

XiaoningLiu commented 3 years ago

Hi @JustinGrote, thanks for bringing up this. We will evaluate this in our furture releases. Also welcome anyone wants to contribute this!

mdmower commented 1 year ago

Thanks for posting the sample tasks.json entry, @JustinGrote! I would also like this feature. In the meantime, I opted for the following to run the task only once, when VSCode opens the source folder:

    {
      "type": "process",
      "label": "azurite blob storage",
      "command": "${command:azurite.start_blob}",
      "problemMatcher": [],
      "isBackground": true,
      "runOptions": {
        "runOn": "folderOpen"
      }
    }

Documentation about runOptions: Tasks: Run behavior