Skip to content

Commit 336be87

Browse files
Merge pull request #423 from AndreyDodonov-EH/fix/install-hang
Fix hanging when ipfs kubo
2 parents a0ceec6 + 75030ff commit 336be87

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/utils/toolchain.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,10 @@ export const TOOL_STEPS: ToolStep[] = [
271271
} else {
272272
const os = platform() === "darwin" ? "darwin" : "linux";
273273
const cpu = arch() === "arm64" ? "arm64" : "amd64";
274+
// Run without sudo first (falls through to ~/.local/bin);
275+
// sudo -n avoids hanging on a password prompt (stdin is /dev/null).
274276
await runPiped(
275-
`curl -fsSL https://dist.ipfs.tech/kubo/v0.33.2/kubo_v0.33.2_${os}-${cpu}.tar.gz | tar xz && cd kubo && ${sudo()}bash install.sh && cd .. && rm -rf kubo`,
277+
`curl -fsSL https://dist.ipfs.tech/kubo/v0.33.2/kubo_v0.33.2_${os}-${cpu}.tar.gz | tar xz && mkdir -p "$HOME/.local/bin" && (cd kubo && bash install.sh || sudo -n bash install.sh) && rm -rf kubo`,
276278
onData,
277279
);
278280
}

0 commit comments

Comments
 (0)