Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

vscode task checking for existence of environment variables

I want to create a vscode task that runs when I open a folder with vscode. The task checks for existence of an environment variable. If it exists, then do nothing, but if it does not exist, then the ...
Oscillon's user avatar
  • 237
2 votes
1 answer
183 views

How to keep double quote in here-string for powershell in vscode task

Steps to Reproduce: add the task below to task.json Run task The expected output is abcd "abcd", howerever, it print abcd abcd in task terminal Actually, I want to use $selectedtext in ...
Shuguang's user avatar
  • 2,061
1 vote
1 answer
299 views

External command is not recognized by VSCODE Tasks

I am just trying to execute a simple shell file from VS-Code tasks functionality. My tasks.json file { "version": "2.0.0", "tasks": [ { "label": &...
Amjad's user avatar
  • 370
0 votes
1 answer
468 views

PreLaunchTask could not find the task - Powershell

I am attempting to make a code-workspace that handles a powershell module and a few automation scripts. So for this example my folder structure looks like this - general folder structure - workspace....
Lucas's user avatar
  • 376
0 votes
1 answer
79 views

powershell in vscode pastes clipboard content on pressing 'w'

I'm not sure how that happened. I tried to create script, to work with some legacy solutions: #!/bin/bash echo "Enter pass" stty -echo trap 'stty echo' EXIT read pass stty echo trap - EXIT echo "...
Michail Highkhan's user avatar
11 votes
3 answers
14k views

How to configure a VSCode Task to run a powershell script in the integrated terminal

In such a way that it is not in a sub shell. I need it to be able to prepare the environment...set environment variable. "version": "0.1.0", "command": "${workspaceFolder}/Invoke-Task.ps1", /*"...
Jason Thurston's user avatar
7 votes
1 answer
2k views

How can I get a task to set a variable that can be used in a configuration?

In VS Code I have defined a task: "tasks": [ { "label": "getcredentials", "type": "shell", "command": ".\\TestScripts\\GetCredentials.ps1" } ] ...
yltlatl's user avatar
  • 73