about summary refs log tree commit diff
path: root/editors/code/package.json
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-07-28 07:03:09 +0000
committerbors <bors@rust-lang.org>2023-07-28 07:03:09 +0000
commitbc1b0bfa7fd8188e207976485a841dc6c37b4f94 (patch)
treeda30a4ca923cb00a14d7be839c2d0060c28add23 /editors/code/package.json
parentb64e5b3919b24bc784f36248e6e1f921ee7bb71b (diff)
parent08b3b2a56db77d56cdf0b6a8a23b8f93f92dae4f (diff)
downloadrust-bc1b0bfa7fd8188e207976485a841dc6c37b4f94.tar.gz
rust-bc1b0bfa7fd8188e207976485a841dc6c37b4f94.zip
Auto merge of #15308 - vsrs:runnable_env_per_platform, r=HKalbasi
Runnable env per platform

This PR adds an option to specify runnables `env` per platform (win32, linux, etc.):
```
{
    "rust-analyzer.runnables.extraEnv": [
            {
                "platform": "win32",
                "env": {
                    "SCITER_BIN_FOLDER": "C:\\Projects\\3rd\\sciter-js-sdk\\bin\\windows\\x64",
                }
            },
            {
                "platform":["linux","darwin"],
                "env": {
                    "SCITER_BIN_FOLDER": "/home/vit/Projects/sciter/sciter-js-sdk/bin/linux/x64",
                }
            }
        ]
}
```
Diffstat (limited to 'editors/code/package.json')
-rw-r--r--editors/code/package.json9
1 files changed, 9 insertions, 0 deletions
diff --git a/editors/code/package.json b/editors/code/package.json
index 8b20011ba50..76d7e91f381 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -328,6 +328,15 @@
                             "items": {
                                 "type": "object",
                                 "properties": {
+                                    "platform": {
+                                        "type": [
+                                            "null",
+                                            "string",
+                                            "array"
+                                        ],
+                                        "default": null,
+                                        "markdownDescription": "Platform(s) filter like \"win32\" or [\"linux\", \"win32\"]. See [process.platform](https://nodejs.org/api/process.html#processplatform) values."
+                                    },
                                     "mask": {
                                         "type": "string",
                                         "description": "Runnable name mask"