diff --git a/.changes/fix-init.md b/.changes/fix-init.md new file mode 100644 index 00000000..4e818054 --- /dev/null +++ b/.changes/fix-init.md @@ -0,0 +1,6 @@ +--- +'tauri-vscode': patch +--- + +Fix `Tauri: Init` command. That command tried to detect workspaces with a `src-tauri` directory, which does not exist yet when `Init` is used. + diff --git a/src/extension.ts b/src/extension.ts index d8cbe373..6c645f19 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -199,7 +199,7 @@ function runTauriInit(): void { () => { const paths = __getNpmProjectsPaths() return paths.filter((p) => { - return fs.existsSync(path.join(p, 'src-tauri')) + return !fs.existsSync(path.join(p, 'src-tauri')) }) } )