existsSync -> pathExists

Use async version of file check.
This commit is contained in:
Elena Tanasoiu
2023-03-21 13:16:39 +00:00
parent c1a515ed82
commit 108943d135

View File

@@ -5,7 +5,6 @@ import {
ensureDir,
writeFile,
opendir,
existsSync,
} from "fs-extra";
import { promise as glob } from "glob-promise";
import { load } from "js-yaml";
@@ -291,8 +290,8 @@ export async function prepareCodeTour(): Promise<void> {
* the prompt to open the workspace)
*/
if (
existsSync(tutorialWorkspacePath) &&
existsSync(toursFolderPath) &&
(await pathExists(tutorialWorkspacePath)) &&
(await pathExists(toursFolderPath)) &&
!isCodespacesTemplate()
) {
const answer = await showBinaryChoiceDialog(