Minor fixes#22
Merged
Merged
Conversation
…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.
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.
Steps
install.sh:
sed -iwith portable mktemp+grep to fix BSD/GNU incompatibilityecho -eandsourcewith POSIX-portable printf and "."set -eufor fail-fast behaviourinstall.ps1 (new):
impl.d:
app.d: