In VSCode is it possible to make SFDX Retrieve Source From Org confirm before proceeding?
There is no confirm prompt currently provided .
I would suggest you can open a feature request on the repository here
Kudos to Charlie Jonas for responding to my github issue and suggesting this:
As a workaround you could write your own task to do this (and pretty much the rest of this extension). Would look something like this:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "refreshFile",
"type": "shell",
"command": " if [ \"${input:confirm}\" != \"yes\" ]; then exit 1; fi && sfdx force:source:retrieve -p ${file}",
"problemMatcher": []
},
],
"inputs": [
{
"type": "pickString",
"id": "confirm",
"description": "Are you sure you want to refresh?",
"options": ["yes", "no"],
"default": "no"
},
]
}
you could add a keybinding for ease of use:
{
"key": "shift+cmd+r",
"command": "workbench.action.tasks.runTask",
"args": "refreshFile",
"when": "editorTextFocus && editorLangId == 'apex'"
}