Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
shell: pwsh
env:
ARCHGATE_VERSION: ${{ vars.LATEST_RELEASE_TAG || '' }}
GH_TOKEN: ${{ github.token }}
run: |
# Resolve version: use ARCHGATE_VERSION if set, otherwise query GitHub
if (-not $env:ARCHGATE_VERSION) {
Expand Down Expand Up @@ -117,6 +118,7 @@ jobs:
- name: Smoke test install.sh
env:
ARCHGATE_VERSION: ${{ vars.LATEST_RELEASE_TAG || '' }}
GH_TOKEN: ${{ github.token }}
run: |
# Resolve version: use ARCHGATE_VERSION if set, otherwise query GitHub
if [ -z "$ARCHGATE_VERSION" ]; then
Expand Down
7 changes: 5 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ foreach ($f in @("$HOME\.bashrc", "$HOME\.bash_profile", "$HOME\.profile")) {
}
}

$InstallDirPosix = $InstallDir -replace '\\', '/' -replace '^([A-Za-z]):', '/$1'
$PathLine = "export PATH=`"$InstallDirPosix:`$PATH`""
$InstallDirPosix = $InstallDir -replace '\\', '/'
if ($InstallDirPosix -match '^([A-Za-z]):') {
$InstallDirPosix = '/' + $Matches[1].ToLower() + $InstallDirPosix.Substring(2)
}
$PathLine = "export PATH=`"${InstallDirPosix}:`$PATH`""

$NeedsUpdate = @()
foreach ($f in $GitBashProfiles) {
Expand Down
12 changes: 7 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ detect_platform() {
x86_64|amd64) arch="x64" ;;
*)
echo "Error: unsupported architecture: $arch" >&2
echo "archgate supports arm64 (macOS) and x64 (Linux)." >&2
echo "archgate supports arm64 (macOS) and x64 (Linux, Windows)." >&2
exit 1
;;
esac
Expand Down Expand Up @@ -253,14 +253,16 @@ setup_path() {
done
echo ""

# Prompt requires /dev/tty — available even when stdin is piped (curl | sh)
if [ ! -r /dev/tty ]; then
echo "No readable TTY available. To add archgate to your PATH manually, add the lines above to your shell profile."
# Prompt requires /dev/tty — available even when stdin is piped (curl | sh).
# Use a subshell to test the actual open, because -r may pass on CI runners
# that have /dev/tty present but no controlling terminal.
if ! (exec </dev/tty) 2>/dev/null; then
echo "No TTY available. To add archgate to your PATH manually, add the lines above to your shell profile."
return
fi

printf "Update these files now? [Y/n] "
if ! read -r answer </dev/tty; then
if ! read -r answer </dev/tty 2>/dev/null; then
echo ""
echo "Could not read from terminal. To add archgate to your PATH manually, add the lines above to your shell profile."
return
Expand Down
Loading