Skip to content

Commit

Permalink
Stop descending at TEA_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Mar 7, 2023
1 parent cdcbfb1 commit f1e8b69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useVirtualEnv.ts
Expand Up @@ -36,13 +36,14 @@ export default async function(cwd: Path = Path.cwd()): Promise<VirtualEnv> {
let srcroot: Path | undefined
let f: Path | undefined

while (dir.neq(Path.root) && dir.neq(home)) {
while (true) {
try {
await supp(dir)
} catch (err) {
err.cause = f
throw err
}
if (dir.eq(TEA_DIR ?? Path.root) || dir.eq(home)) break
dir = dir.parent()
}

Expand Down

0 comments on commit f1e8b69

Please sign in to comment.