Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0x committed May 30, 2024
1 parent bfb82ae commit 18bf643
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions _install/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,19 @@ async function setupWindows() {
Deno.exit(1);
}

const scoop = path.join(homeDir, "scoop", "shims", "scoop.ps1");

if (!await fs.exists(scoop)) {
const scoopShimDir = path.join(homeDir, "scoop", "shims");
if (!await fs.exists(scoopShimDir)) {
await $`pwsh -noprofile -noninteractive -`
.stdinText(`
Invoke-RestMethod get.scoop.sh | Invoke-Expression
scoop install chezmoi git
`);
}

const chezmoi = (await $`${scoop} which chezmoi`).stdout.trim();
const chezmoi = path.join(scoopShimDir, "chezmoi.exe");
await $`pwsh -noprofile -noninteractive -`
.stdinText(`
"${chezmoi}" init --verbose --apply ${account}
. "${chezmoi}" init --verbose --apply ${account}
`);
}

Expand Down

0 comments on commit 18bf643

Please sign in to comment.