Skip to content

Replace OS detection with package manager detection in install scripts#107

Merged
markphip merged 2 commits intomainfrom
copilot/change-os-detection-to-package-manager
Apr 1, 2026
Merged

Replace OS detection with package manager detection in install scripts#107
markphip merged 2 commits intomainfrom
copilot/change-os-detection-to-package-manager

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

Install scripts were detecting the OS via /etc/os-release to infer the package manager, rather than detecting the package manager directly. This couples logic unnecessarily to OS identity rather than actual available tooling.

Changes

  • microsoft-git, devtool, artifacts-helper, go install scripts: Removed . /etc/os-release and replaced ${ID} = "mariner" conditionals with command -v tdnf >/dev/null 2>&1 checks — matching the pattern already used in docfx/install.sh
  • Version bumps: Incremented patch version for each modified feature

Before

. /etc/os-release
if [ "${ID}" = "mariner" ]; then
    tdnf install -y curl ca-certificates
else
    check_packages curl ca-certificates
fi

After

if command -v tdnf >/dev/null 2>&1; then
    tdnf install -y curl ca-certificates
else
    check_packages curl ca-certificates
fi
Feature Version
microsoft-git 1.0.8 → 1.0.9
devtool 1.0.3 → 1.0.4
artifacts-helper 3.0.5 → 3.0.6
go 1.2.0 → 1.2.1

external-repository has no package manager logic; docfx was already compliant — neither required changes.

Copilot AI changed the title [WIP] Change from OS detection to package manager detection Replace OS detection with package manager detection in install scripts Apr 1, 2026
Copilot AI requested a review from markphip April 1, 2026 13:03
@markphip markphip marked this pull request as ready for review April 1, 2026 13:19
@markphip markphip merged commit e48c2ff into main Apr 1, 2026
15 of 18 checks passed
@markphip markphip deleted the copilot/change-os-detection-to-package-manager branch April 1, 2026 13:37
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.

Change from OS detection to package manager detection

2 participants