Skip to content

Run VSCode tasks in a single session #78319

@pt12lol

Description

@pt12lol

I would like to migrate my local deployment commands to VSCode task. I need to run them as root. When I did those in the terminal, I was asked to provide the password only once.

$ sudo echo hello                                                                                                                                                                                                                                                        
[sudo] password for pt12lol: 
hello
$ sudo echo hello                                                                                                                                                                                                                                                        
hello

Unfortunately when I configured my VSCode task:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Hello task",
            "type": "shell",
            "command": "sudo echo hello"
        }
    ]
}

I suppose it runs every task in a separate session, and I am asked to provide my password every single time.

> Executing task: sudo echo hello <

[sudo] password for pt12lol: 
hello

Terminal will be reused by tasks, press any key to close it.

> Executing task: sudo echo hello <

[sudo] password for pt12lol: 
hello

Terminal will be reused by tasks, press any key to close it.

I would like to set up tasks deployment so that it keeps last sessions and I am not asked for my password every single time.

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)feature-requestRequest for new features or functionalitytasksTask system issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions