Skip to content

Minor fixes#22

Merged
kassane merged 6 commits into
mainfrom
minor-fixes
Feb 19, 2026
Merged

Minor fixes#22
kassane merged 6 commits into
mainfrom
minor-fixes

Conversation

@kassane
Copy link
Copy Markdown
Owner

@kassane kassane commented Feb 19, 2026

Steps

install.sh:

  • exit with clear error on unsupported OS/arch combos (macOS x86_64, Alpine arm64, FreeBSD arm64) instead of silently building a broken URL
  • add SHA256 checksum verification for all downloaded archives
  • add install.ps1 reference in the Windows error message
  • replace sed -i with portable mktemp+grep to fix BSD/GNU incompatibility
  • replace echo -e and source with POSIX-portable printf and "."
  • detect login shell via $SHELL instead of $ZSH_VERSION/$BASH_VERSION
  • add set -eu for fail-fast behaviour

install.ps1 (new):

  • detect x64 vs arm64 via RuntimeInformation.OSArchitecture
  • verify SHA256 with Get-FileHash before extraction
  • set LDCUP_DIR and PATH persistently in the user environment
  • bootstrap ldc2-latest after install

impl.d:

  • fix defaultInstallRoot() called before detectPlatform() causing wrong default path on Windows (currentOS was always .init)
  • fix opend toolchain extract path using hardcoded "ldc2-" prefix
  • fix compilerVersion never set on the opend-latest early-return path
  • fix ref string params on extractTarXZ, extract7z, uninstallCompiler
  • extract shellConfigFiles() helper to deduplicate 4 identical blocks
  • fix listLDCVersions printing a D array literal; now one tag per line
  • use stripLeadingV() instead of .replace("v","") in getCompilerDownloadUrl

app.d:

  • fix arg == "--" check (was endsWith, matched "foo--")
  • fix leading-v strip using normaliseCompilerSpec() instead of .replace("v","") which stripped every occurrence
  • fix "--" index arithmetic being relative to args[1..$]
  • change main to return int with try/catch for proper exit codes
  • split argument parsing into parseArgs() for testability
  • add explicit imports

…ndows support

install.sh:
- exit with clear error on unsupported OS/arch combos (macOS x86_64,
  Alpine arm64, FreeBSD arm64) instead of silently building a broken URL
- add SHA256 checksum verification for all downloaded archives
- add install.ps1 reference in the Windows error message
- replace `sed -i` with portable mktemp+grep to fix BSD/GNU incompatibility
- replace `echo -e` and `source` with POSIX-portable printf and "."
- detect login shell via $SHELL instead of $ZSH_VERSION/$BASH_VERSION
- add `set -eu` for fail-fast behaviour

install.ps1 (new):
- detect x64 vs arm64 via RuntimeInformation.OSArchitecture
- verify SHA256 with Get-FileHash before extraction
- set LDCUP_DIR and PATH persistently in the user environment
- bootstrap ldc2-latest after install

impl.d:
- fix defaultInstallRoot() called before detectPlatform() causing wrong
  default path on Windows (currentOS was always .init)
- fix opend toolchain extract path using hardcoded "ldc2-" prefix
- fix compilerVersion never set on the opend-latest early-return path
- fix ref string params on extractTarXZ, extract7z, uninstallCompiler
- extract shellConfigFiles() helper to deduplicate 4 identical blocks
- fix listLDCVersions printing a D array literal; now one tag per line
- use stripLeadingV() instead of .replace("v","") in getCompilerDownloadUrl

app.d:
- fix arg == "--" check (was endsWith, matched "foo--")
- fix leading-v strip using normaliseCompilerSpec() instead of
  .replace("v","") which stripped every occurrence
- fix "--" index arithmetic being relative to args[1..$]
- change main to return int with try/catch for proper exit codes
- split argument parsing into parseArgs() for testability
- add explicit imports
This reverts commit d26e507.
@kassane kassane marked this pull request as ready for review February 19, 2026 14:37
@kassane kassane merged commit 75ca471 into main Feb 19, 2026
7 checks passed
@kassane kassane deleted the minor-fixes branch February 19, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant