Skip to content

Commit d4e84b4

Browse files
committed
Refactor to consistent verification across all platforms
Previously each OS had different verification approaches: - Windows: PowerShell Get-Command check (failed due to PATH timing) - Linux/macOS: No verification Now all platforms use a single bash verification step that runs after installation. This works because GITHUB_PATH updates take effect in subsequent steps, not within the same step.
1 parent 262dd71 commit d4e84b4

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

setup/action.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ runs:
7777
run: |
7878
# Install quarto
7979
[ ${{ runner.os }} != "Windows" ] && installer=${{ steps.download-quarto.outputs.installer }}
80-
case $RUNNER_OS in
80+
case $RUNNER_OS in
8181
"Linux")
8282
sudo apt -y install ./$installer
8383
;;
@@ -92,24 +92,24 @@ runs:
9292
else
9393
powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1 ${{ inputs.version }}
9494
fi
95-
96-
# Check if installation succeeded
97-
if [ $? -ne 0 ]; then
98-
echo "ERROR: Quarto installation failed"
99-
exit 1
100-
fi
101-
102-
echo "Quarto Installed !"
10395
;;
10496
*)
10597
echo "$RUNNER_OS not supported"
10698
exit 1
10799
;;
108100
esac
109101
[ ${{ runner.os }} != "Windows" ] && rm $installer
110-
[ ${{ runner.os }} != "Windows" ] && echo "Quarto Installed !"
111102
shell: bash
112103
working-directory: ${{ runner.temp }}
104+
- name: 'Verify Quarto installation'
105+
run: |
106+
if ! command -v quarto &> /dev/null; then
107+
echo "ERROR: Quarto installation completed but quarto command not found"
108+
exit 1
109+
fi
110+
echo "Quarto Installed !"
111+
quarto --version
112+
shell: bash
113113
- name: 'Install TinyTeX'
114114
env:
115115
QUARTO_PRINT_STACK: true

setup/install-quarto-windows.ps1

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,4 @@ if ([string]::IsNullOrEmpty($version)) {
5959
}
6060
}
6161

62-
# Verify Quarto is available
63-
$quartoPath = Get-Command quarto -ErrorAction SilentlyContinue
64-
if (-not $quartoPath) {
65-
Write-Error "Quarto installation completed but quarto command not found in PATH"
66-
exit 1
67-
}
68-
6962
exit 0

0 commit comments

Comments
 (0)