Skip to content

Commit

Permalink
use echo for opening
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Oct 19, 2023
1 parent f9e6c38 commit 197df75
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/client/terminals/envCollectionActivation/deactivatePrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,9 @@ ${content}
}

private async openScript(scriptPath: string) {
const deferred = createDeferred<TextDocument>();
this.documentManager.onDidChangeActiveTextEditor((e) => {
if (e) {
deferred.resolve(e.document);
}
});
await shellExec(`${this.codeCLI} -r ${scriptPath}`, { shell: this.appEnvironment.shell });
return deferred.promise;
const init = await shellExec(`echo ${scriptPath}`, { shell: this.appEnvironment.shell });
const initPath = init.stdout.trim();
const document = await this.documentManager.openTextDocument(initPath);
return document;
}
}

0 comments on commit 197df75

Please sign in to comment.