actboy168 / vscode-tasks

MIT License
37 stars 14 forks source link

Task is ignored by extension when using platform-specific options #24

Closed BloodyFoxy closed 1 year ago

BloodyFoxy commented 3 years ago

When configuring OS-specific options for tasks, extension ignores it's options completely.

Here I setup extension in global options:

{
            "label": "VM: Rollback to initial snapshot",
            "type": "shell",
            "dependsOrder": "sequence",
            "options": {
                "statusbar": {
                    "hide": false,
                    "label": "won't be seen"
                }
            },
            "windows": {
                "options": {
                    "shell": {
                        "executable": "C:\\Windows\\System32\\cmd.exe",
                        "args": [
                            "/c"
                        ]
                    }
                },
                "command": {
                    "value": "${env:ProgramFiles(x86)}\\VMware\\VMware Workstation\\vmrun",
                    "quoting": "strong"
                },
                "args": [
                    "-T", "ws",
                    "revertToSnapshot",
                    "_cut_"
                    "nogui",
                ]
            },
            "problemMatcher": [],

        },

Here I try to put extension options under "windows" platform (normally you shouldn't even assume to do this):

"windows": {
                "options": {
                     "statusbar": {
                    "hide": false,
                    "label": "won't be seen"
                     },
                    "shell": {
                        "executable": "C:\\Windows\\System32\\cmd.exe",
                        "args": [
                            "/c"
                        ]
                    }
                },
BloodyFoxy commented 3 years ago

It seems like your extension also only support tasks that contain command option. I have tasks that run tasks in batch (described with dependsOn)

actboy168 commented 3 years ago

"hide": false means not to hide.You should use

"options": {
    "statusbar": {
        "hide": true,
        "label": "won't be seen"
    }
}