I develop a vscode extension and I want to take a value from a user and use it later. I use async/await because otherwise I don't get the promt input for the user.
async function input() {
const destBranch = await vscode.window.showInputBox({ placeHolder: 'Insert the name of the destination branch' });
const devBranch = await vscode.window.showInputBox({ placeHolder: 'Insert the name of the Developing branch' });
const term = vscode.window.createTerminal("gitTerminal");
term.show();
term.sendText('git switch ' + destBranch);
term.sendText('git checkout ' + devBranch + ' file.txt');
term.sendText('git add .');
term.sendText('git commit -m "tests"');
};
input();
it works like this but I want to do the term commands outside of the async function. Any ideas? Thank you in advance