Skip to content

Commit

Permalink
Fix zsh dot dir fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Sep 16, 2024
1 parent 37dfbaf commit 5ea7946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class Zsh implements UnixShell {
"echo -n $ZDOTDIR",
]);
const stdout = new TextDecoder().decode(output.stdout).trim();
zshDotDir = stdout;
zshDotDir = stdout.length > 0 ? stdout : undefined;
}

return zshDotDir;
Expand Down Expand Up @@ -189,7 +189,7 @@ export class Zsh implements UnixShell {
const fpathSetup =
`# Add deno completions to search path\nif [[ ":$FPATH:" != *":${completionDir}:"* ]]; then export FPATH="${completionDir}:$FPATH"; fi`;

const zshDotDir = await this.getZshDotDir() ?? homeDir;
const zshDotDir = (await this.getZshDotDir()) ?? homeDir;
// try to figure out whether the user already has `compinit` being called

let append: string | undefined;
Expand Down

0 comments on commit 5ea7946

Please sign in to comment.