Skip to content

fix: correct Windows drive letter casing and platform error message#91

Merged
rhuanbarreto merged 6 commits into
mainfrom
fix/install-script-windows-improvements
Mar 19, 2026
Merged

fix: correct Windows drive letter casing and platform error message#91
rhuanbarreto merged 6 commits into
mainfrom
fix/install-script-windows-improvements

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • install.ps1: Fix POSIX path conversion to lowercase the drive letter (C:/c instead of /C), matching Git Bash conventions
  • install.sh: Include Windows in the unsupported architecture error message for consistency with actual platform support

Test plan

  • Run install.ps1 on Windows and verify the Git Bash PATH entry uses a lowercase drive letter (e.g., /c/Users/...)
  • Trigger the unsupported architecture error in install.sh and confirm the message mentions Windows

- install.ps1: lowercase drive letter in POSIX path conversion (C: → /c, not /C)
- install.sh: include Windows in supported platforms error message
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 19, 2026

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: ecf5cf6
Status: ✅  Deploy successful!
Preview URL: https://9e99d108.archgate-cli.pages.dev
Branch Preview URL: https://fix-install-script-windows-i.archgate-cli.pages.dev

View logs

- install.ps1: lowercase drive letter in POSIX path conversion (C: → /c)
- install.sh: include Windows in supported platforms error message
- smoke-test.yml: pass GH_TOKEN so gh can query releases
$InstallDirPosix: was parsed as a drive-qualified variable.
Use ${InstallDirPosix} to delimit the variable name.
CI runners report /dev/tty as readable (-r) but fail to open it.
Test with an actual fd open instead, and suppress stderr on the
read to avoid noisy error messages in non-interactive environments.
The -replace script block syntax requires PowerShell 6+ and the
$args automatic variable behaves differently across versions.
Use -match with $Matches instead for cross-version compatibility.
exec redirect failures are fatal in sh and cannot be caught by if.
Use a subshell (exec </dev/tty) so the failure is contained.
@rhuanbarreto rhuanbarreto merged commit 521d8bf into main Mar 19, 2026
8 checks passed
@rhuanbarreto rhuanbarreto deleted the fix/install-script-windows-improvements branch March 19, 2026 17:30
@github-actions github-actions Bot mentioned this pull request Mar 19, 2026
rhuanbarreto added a commit that referenced this pull request Mar 20, 2026
)

* fix: correct Windows drive letter casing and platform error message

- install.ps1: lowercase drive letter in POSIX path conversion (C: → /c, not /C)
- install.sh: include Windows in supported platforms error message

* fix: install script Windows fixes and CI smoke test auth

- install.ps1: lowercase drive letter in POSIX path conversion (C: → /c)
- install.sh: include Windows in supported platforms error message
- smoke-test.yml: pass GH_TOKEN so gh can query releases

* fix: delimit PowerShell variable to avoid parser error

$InstallDirPosix: was parsed as a drive-qualified variable.
Use ${InstallDirPosix} to delimit the variable name.

* fix: detect missing TTY by actually opening /dev/tty

CI runners report /dev/tty as readable (-r) but fail to open it.
Test with an actual fd open instead, and suppress stderr on the
read to avoid noisy error messages in non-interactive environments.

* fix: use compatible PowerShell syntax for drive letter lowercasing

The -replace script block syntax requires PowerShell 6+ and the
$args automatic variable behaves differently across versions.
Use -match with $Matches instead for cross-version compatibility.

* fix: test /dev/tty in a subshell to avoid aborting the script

exec redirect failures are fatal in sh and cannot be caught by if.
Use a subshell (exec </dev/tty) so the failure is contained.
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