Repository navigation
Conversation
`uname -s` reports `HarmonyOS` on HarmonyOS/OpenHarmony devices, which the script does not recognize, and `/etc/os-release` may be absent. Detect it before the generic Linux branch, also recognize `ID=openharmony`/`ohos` in os-release, and accept `--os openharmony` (plus the `harmonyos`/`ohos` aliases). Guard the `getconf LONG_BIT` probe used for aarch64. Adds dry-run tests that put a `uname` shim on PATH and serve a file feed.
springmin
added a commit
to springmin/install-scripts-ohos
that referenced
this pull request
Nov 25, 2026
- src/ohos-install-from-pins.sh installs the SDK pinned in a sdk-ohos versions.env through the shared installer, so both installers use the same download, checksum, extraction, signing and workload steps. - tests/ohos: cover the wrapper and its refusal to install without a pinned digest (18 cases in total). - docs/harmonyos.md: document the wrapper and link the detection-only upstream PR (dotnet#752).
springmin
added a commit
to springmin/runtime-ohos
that referenced
this pull request
Nov 25, 2026
Add dotnet/install-scripts#752 (openharmony OS detection) to the upstream-PR list and the new install-scripts-ohos fork to the sibling repository table.
File.SetUnixFileMode is unsupported on Windows and the analyzer flags the call site even though the test is skipped there. Guard it with OperatingSystem.IsWindows().
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.
Summary
dotnet-install.shcannot be used on HarmonyOS/OpenHarmony today because OS detection fails before any download happens:uname -sreportsHarmonyOSon HarmonyOS/OpenHarmony devices, notLinux, soget_current_os_nameexits withOS name could not be detected: UName = HarmonyOS./etc/os-releaseis typically absent on these devices, so the distro-detection path cannot help.openharmony-arm64(arm64 only today).This change adds detection and the corresponding
--osvalue only. It does not add a feed, assets, code signing or packaging; those remain downstream for now.Changes
get_current_os_name: recognizeHarmonyOS,OpenHarmonyandOHOS; forLinux, recognizeID/ID_LIKEcontainingopenharmony/ohos(covers OpenHarmony systems that reportLinux).get_normalized_os: acceptopenharmonyand mapharmonyos/ohosto it, so the name matches the RID components the script composes.--oshelp text and the unsupported-value error.get_machine_architecture: only querygetconf LONG_BITwhengetconfexists (minimal images may not ship it).unameshim onPATHand serve afile://feed, assertingdotnet-sdk-<version>-openharmony-arm64.tar.gzfor both the detected OS and the--osaliases.Testing
Verified on a HarmonyOS device (aarch64) with the same shim/feed setup:
The added xunit cases run in the Unix leg of the PR pipeline.