feat: add POSIX null command : as a builtin#175
Merged
Conversation
597d20a to
366fc24
Compare
`:` is POSIX's null command: it discards its arguments and always exits 0. Bash treats it as a builtin. We had `true` and `false` already; add `:` alongside them (same `ExitCodeCommand(0)` underneath). Without this, `deno task` for a `package.json` script defined as `"test": ":"` (a common no-op pattern, e.g. used in the aube benchmark fixture's ~1400-package project) fails with `:: command not found` and exit code 127, while bash / sh / dash all return 0 cleanly. Adds an integration test covering the bare `:`, argument discarding, and `&&` / `||` short-circuit behavior.
366fc24 to
fa6b786
Compare
bartlomieju
added a commit
to denoland/deno
that referenced
this pull request
May 20, 2026
Picks up denoland/deno_task_shell#175, which adds the POSIX `:` (null command) as a shell builtin alongside `true` and `false`. Without it `deno task` fails with `:: command not found` (exit 127) on any package.json whose script is the bare colon no-op, e.g. the `"test": ":"` script in the aube benchmark fixture (https://aube.en.dev/benchmarks.html) that previously prevented Deno from completing the install-test scenario at all. Verified locally: `deno task test` against a minimal `{ "scripts": { "test": ":" } }` package now exits 0.
bartlomieju
added a commit
to denoland/deno
that referenced
this pull request
May 20, 2026
Picks up two upstream changes in deno_task_shell: support for `set -e` / `set +e` (and the `set -o errexit` long form), which aborts the surrounding sequential list on the first non-zero exit, and the POSIX null command `:` as a builtin. See denoland/deno_task_shell#171 and denoland/deno_task_shell#175.
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.
:is POSIX's null command: it discards its arguments and alwaysexits 0. Bash treats it as a builtin. We had
trueandfalsealready; add
:alongside them (sameExitCodeCommand(0)underneath).Without this,
deno taskfor apackage.jsonscript defined as"test": ":"(a common no-op pattern, e.g. used in the aube benchmarkfixture at https://aube.en.dev/benchmarks.html on a ~1400-package
project) fails with
:: command not foundand exit code 127, whilebash / sh / dash all return 0 cleanly. As a result the benchmark's
install-testscenario for Deno can never complete.Adds an integration test covering the bare
:, argument discarding,and
&&/||short-circuit behavior.