ci(vnext): fail if a shell script is added to the plugin source - #8
Merged
Conversation
The glean-vnext plugin runs on end-user machines including Windows, where POSIX shell is unavailable (we already moved the launcher from start.sh to start.mjs). Add a cross-platform Node guard that fails CI when any shell script appears under sources/glean-vnext, and points contributors to a Node (.mjs) alternative for cross-platform compatibility. - scripts/check-no-shell-scripts.mjs: recursive scan for shell extensions (.sh/.bash/.zsh/.ksh) and bash/sh shebangs; a node shebang (.mjs) passes. Written in Node (not bash) so it runs identically on Windows/macOS/Linux. - package.json: add "check:no-shell" so contributors can run it locally. - .github/workflows/test.yml: run the guard after install, before build.
steve-calvert-glean
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a CI guard that fails if a shell/bash script is added under the
glean-vnextplugin source, with a message steering contributors to a Node (.mjs) alternative for cross-platform (Windows) compatibility.The plugin runs on end-user machines including Windows, where POSIX shell is unavailable — we already migrated the launcher from
start.shtostart.mjsfor this reason. This locks that decision in.Changes
scripts/check-no-shell-scripts.mjs— recursive scan ofsources/glean-vnext/for shell extensions (.sh/.bash/.zsh/.ksh) and bash/sh shebangs. A#!/usr/bin/env nodeshebang (.mjs) passes. Written in Node (not bash) so it runs identically on Windows/macOS/Linux, in CI and locally.package.json— newcheck:no-shellscript so contributors can run it locally on any OS..github/workflows/test.yml— runs the guard right afternpm ci, before the build, for fast feedback.On failure, contributors see
Verification (local)
.shfile added → fails (exit 1) with suggestion.shextension → fails (exit 1).mjs→ not flagged (exit 0)Scope is intentionally limited to
sources/glean-vnext(per request);SCAN_ROOTSin the script can be broadened later.