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
4 changes: 2 additions & 2 deletions src/quarto-cli/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Quarto CLI",
"id": "quarto-cli",
"version": "1.1.4",
"version": "1.1.5",
"description": "Installs the Quarto CLI. Auto-detects latest version.",
"documentationURL": "https://github.com/rocker-org/devcontainer-features/tree/main/src/quarto-cli",
"options": {
Expand All @@ -22,7 +22,7 @@
"installChromium": {
"type": "boolean",
"default": false,
"description": "Run the `quarto install chromium` command. Check the document for details."
"description": "Run the `quarto install chromium` or `quarto install chrome-headless-shell` command. Check the document for details."
}
},
"installsAfter": [
Expand Down
10 changes: 9 additions & 1 deletion src/quarto-cli/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ check_packages() {
fi
}

quarto_supports_chrome_headless_shell() {
LC_ALL=C quarto install --help 2>&1 | grep -Fq 'chrome-headless-shell'
}

find_version_from_git_tags() {
local variable_name=$1
local requested_version=${!variable_name}
Expand Down Expand Up @@ -142,7 +146,11 @@ if [ "${INSTALL_CHROMIUM}" = "true" ]; then
echo "(!) Quarto CLI installs headless Chromium via Puppeteer."
echo " The bundled Chromium that Puppeteer installs may not work on Docker containers."
echo " Please check the Puppeteer document: <https://pptr.dev/troubleshooting#running-puppeteer-in-docker>"
su "${USERNAME}" -c 'quarto install chromium --quiet'
if quarto_supports_chrome_headless_shell; then
su "${USERNAME}" -c 'quarto install chrome-headless-shell --quiet'
else
su "${USERNAME}" -c 'quarto install chromium --quiet'
fi
echo "Chromium installation complete."
fi

Expand Down
8 changes: 4 additions & 4 deletions test/quarto-cli/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
}
}
},
"chromium-on-ubuntu": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"chromiumheadless-on-debian": {
"image": "mcr.microsoft.com/devcontainers/base:debian",
"features": {
"quarto-cli": {
"version": "1.4", // https://github.com/quarto-dev/quarto-cli/issues/10961
"version": "1.9",
"installChromium": true
},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "libgtk-3-dev,libnotify-dev,libgconf-2-4,libnss3,libxss1,libasound2"
"packages": "chromium"
}
}
}
Expand Down
Loading