Skip to content

Commit

Permalink
getToken to separate module;Tasks process is async
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezvoliver committed Nov 6, 2023
1 parent 33222cc commit bfdeb5a
Show file tree
Hide file tree
Showing 3 changed files with 346 additions and 376 deletions.
3 changes: 1 addition & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function _getGcloudAccounts(context: vscode.ExtensionContext){
command = "which " + cli;
}
let result = cp.spawnSync(command, {shell:true});
console.log("result: " + result);
return !result.status;
}

Expand All @@ -77,7 +76,7 @@ function _getGcloudAccounts(context: vscode.ExtensionContext){
function promptProject(context: vscode.ExtensionContext, account:string){
// If "earthengine", project is not required.
if(account==="earthengine"){
EETasksPanel.render(context.extensionUri, context.globalState, account.trim(), "");
EETasksPanel.render(context.extensionUri, context.globalState, account.trim(), null);
}else{
vscode.window.showInputBox({
title: "Select a project to use.",
Expand Down
Loading

1 comment on commit bfdeb5a

@lopezvoliver
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the dependence of EETasksPanel.ts on external curl by using the native https module, so the flow needs to be asynchronous. Still need to update some of this in extension.ts. For the gcloud-based process, it still requires the external (python-based) gcloud cli, but now uses child_process exec instead of execSync.

Please sign in to comment.