fix(binary-manager): resolve + download Dolt correctly on Windows - #23
Merged
Conversation
…ndows 'deltix init' failed on Windows with 'Executable not found in /run/user/1000/fnm_multishells/47653_1787712485619/bin:/home/sammy/.cargo/bin:/home/sammy/.nvm/versions/node/v20.18.1/bin:/home/sammy/.dotnet:/home/sammy/.console-ninja/.bin:/home/sammy/.local/share/pnpm:/home/sammy/.bun/bin:/home/sammy/.deno/bin:/usr/share/archcraft/scripts:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/share/dotnet:/home/sammy/.dotnet/tools:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/var/lib/snapd/snap/bin:/home/sammy/Android/Sdk/emulator:/home/sammy/Android/Sdk/platform-tools:/home/sammy/.turso:/usr/local/go/bin:/home/sammy/go/bin: .deltix\bin\dolt-2.3.1\bin\dolt'. Two root causes: - defaultHomeDir() used process.env.HOME, which is undefined on Windows (it uses USERPROFILE), so the install path came out RELATIVE. Now uses os.homedir() -> absolute C:\Users\<user>\.deltix. - binary-manager only supported darwin/linux tarballs. Added win32: dolt-windows-<arch>.zip, extracted via 'tar -xf' (bsdtar on Win10+), binary named dolt.exe, findDoltExecutable looks for dolt.exe. Also made the local workflow resilient: - 'deltix init' no longer hard-fails if Dolt can't be resolved yet (first-run download needs network): it still binds the project and warns that 'deltix start' will initialize the engine. - 'deltix start' now ensures the local Dolt repo exists (idempotent) before serving it. extractTarGz -> extractArchive (auto-detects gzip/zip). 113 unit tests pass, build + lint clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
deltix initfailed on Windows:Executable not found in $PATH: .deltix\\bin\\dolt-2.3.1\\bin\\dolt.Root causes
defaultHomeDir()usedprocess.env.HOME— undefined on Windows (it usesUSERPROFILE) — so the install path was relative. Now usesos.homedir()(absolute).binary-manageronly handled darwin/linux tarballs. Added win32:dolt-windows-<arch>.zip, extracted viatar -xf(bsdtar on Win10+), binarydolt.exe, andfindDoltExecutablelooks fordolt.exe.Also
deltix initno longer hard-fails if Dolt can't be resolved yet (first-run download needs network): it binds the project and warns thatdeltix startwill initialize the engine.deltix startnow ensures the local Dolt repo exists (idempotent) before serving it.extractTarGz→extractArchive(auto-detects gzip/zip).Verification
113 unit tests pass, build + lint clean. (Windows dolt download can't be exercised from this Linux runner; the path/format logic mirrors Dolt's official release layout.)