Mechanisms
absent builtin noop
Section titled “absent builtin noop”POSIX builtins absent in PowerShell (command -v) parse as argument noise and fail silently instead of erroring.
Cases: command-v-noop
folder lookup answers empty instead of failing
Section titled “folder lookup answers empty instead of failing”A known-folder lookup verifies the directory before answering and returns an empty string rather than an error when it is absent, and that empty string is a valid argument to every path function downstream, so the failure becomes a relative path instead of an exception.
Cases: known-folder-empty-not-error
non-atomic ACL mutation order
Section titled “non-atomic ACL mutation order”Windows permissions are changed by a sequence of separate mutations with no atomic replace, and removing inheritance takes effect immediately, so an interrupted restrict-then-grant order leaves an empty DACL that denies everyone including the owner.
Cases: icacls-inheritance-r-empty-dacl
alias shadowing
Section titled “alias shadowing”Built-in aliases (curl, wget) and PATH shims shadow the binaries users intend to run.
Cases: curl-alias · timeout-is-not-a-command-wrapper · ps51-vs-7-split
AltGr is reported as Ctrl+Alt
Section titled “AltGr is reported as Ctrl+Alt”Windows implements right Alt as Ctrl plus Alt, so a character typed with AltGr arrives carrying both modifiers and any handler treating Ctrl as a shortcut prefix silently consumes real text, but only on layouts that need AltGr to produce it.
Cases: altgr-reports-as-ctrl-alt
app execution alias stub
Section titled “app execution alias stub”A Microsoft Store App Execution Alias is a real file that resolves by name and, when run, advertises the Store instead of starting the program. Presence checks all pass and only execution disagrees.
Cases: windowsapps-python3-stub-needs-probe
appexeclink
Section titled “appexeclink”WindowsApps store aliases are zero-byte IO_REPARSE_TAG_APPEXECLINK files that pass stat probes but EPERM on spawn.
Cases: git-merge-driver-sh-escapes · windowsapps-alias-eperm
bom sniffing
Section titled “bom sniffing”Windows PowerShell 5.1 decides a script file’s encoding by BOM presence; no BOM means the legacy ANSI code page.
Cases: bom-less-ps1-cp949 · cmd-bom-displaces-label
bun windowstyle argv reject
Section titled “bun windowstyle argv reject”Bun 1.3.14 Windows spawn fails outright when powershell.exe argv contains the -WindowStyle Hidden pair.
Cases: bun-ps-windowstyle-argv
caller chosen interpreter
Section titled “caller chosen interpreter”On Windows the interpreter is chosen by the caller, by file association, or by PATHEXT, and none of them reads the shebang. A file can be valid in one language and executed as another.
Cases: caller-picks-interpreter-not-shebang
case-insensitive filesystem, case-sensitive containers
Section titled “case-insensitive filesystem, case-sensitive containers”NTFS matches paths without regard to case while preserving the casing written, so two spellings name one file, but every ordinary string container treats them as distinct keys and the same lowercasing fix would be wrong on a case-sensitive filesystem.
Cases: path-case-sensitive-map
cmd bat spawn hardening
Section titled “cmd bat spawn hardening”Node CVE-2024-27980 hardening: spawning .bat/.cmd without shell errors EINVAL (18.20.2/20.12.2/21.7.3+).
Cases: spawn-npm-enoent-einval
cmd reparse
Section titled “cmd reparse”Any command line routed through cmd.exe is re-tokenized; metacharacters and newlines inside arguments become command syntax.
Cases: get-command-where-disagree · cmd-shim-reparses-argv · cmd-start-ampersand-splits · shell-true-fallback-injects
collection unrolling
Section titled “collection unrolling”PowerShell unrolls pipelines: zero items become null, one item loses its array, many become Object[] — types change with count.
Cases: get-content-scalar-collapse · return-does-not-mean-return · if-nativecmd-truthiness
CreateProcess command line capped at 32767
Section titled “CreateProcess command line capped at 32767”CreateProcess limits the whole assembled command line to 32767 characters and reports the overflow with the same Win32 code used for an over-long path, so a payload passed as an argument fails under an error that describes filenames.
Cases: createprocess-cmdline-32767
comparison as filter
Section titled “comparison as filter”Comparison operators against a collection FILTER it (returning matching elements) instead of returning a boolean.
Cases: ne-filters-instead-of-compares
console allocation
Section titled “console allocation”Console-subsystem binaries get a new console at CreateProcess when the parent has none — before any flag is parsed.
Cases: windowstyle-hidden-vs-windowshide
CRLF residue after LF-only splitting
Section titled “CRLF residue after LF-only splitting”Windows tools end lines with CRLF, so splitting text on LF alone leaves a trailing CR on every line; exact comparisons and anchored patterns then fail against a character that is invisible in editors, diffs, and terminal output.
Cases: autocrlf-shebang-cr · cmd-lf-drops-first-byte · lf-pure-transform-mixes-eol · split-n-leaves-cr
culture parsing
Section titled “culture parsing”Numeric/date casts honor the host culture; comma-decimal locales parse differently than invariant culture.
Cases: culture-comma-decimal-cast
cwd handle held
Section titled “cwd handle held”Windows holds a process’s current directory as an open handle without FILE_SHARE_DELETE for as long as it is the cwd, so the directory cannot be unlinked until some process chdir()s away. POSIX keeps only an inode reference, so the name can go while the process stays inside.
Cases: cwd-locked-cannot-unlink
default encoding
Section titled “default encoding”5.1 cmdlets default to UTF-16LE or ANSI when writing; 7 defaults to BOM-less UTF-8 — same code, different bytes.
Cases: bom-less-ps1-cp949 · bomless-bat-oem-codepage · oss-outfile-bom · redirected-ps-output-mojibake · tee-object-utf16 · utf8-bom-still-breaks-grep · ps51-vs-7-split
default shell selection
Section titled “default shell selection”CI runners pick a default shell per OS (pwsh on windows-latest); unmarked run: steps inherit it.
Cases: actions-default-shell · npm-script-runs-under-cmd
MS-DOS device names reserved in every directory
Section titled “MS-DOS device names reserved in every directory”Win32 path parsing recognizes legacy device names such as CON, NUL, and COM1 as their own path type and rewrites them into the NT device namespace before any directory applies, with or without an extension, so opening one succeeds as a device rather than creating a file.
Cases: reserved-dos-device-names
drive letter parses as a URL scheme
Section titled “drive letter parses as a URL scheme”A Windows absolute path begins with a drive letter and colon, so any API that parses its input as a URL reads that letter as the protocol, while an absolute POSIX path coincidentally parses as root-relative and works.
Cases: dynamic-import-needs-file-url
reparse point written without a print name
Section titled “reparse point written without a print name”A mount-point reparse point stores a substitute name in the NT object namespace and a print name in Win32 form. A buffer built by hand often carries only the substitute name, so the kernel still resolves the link while Win32 path resolution through it yields nothing — and an empty directory is not an error, so every caller reports success.
Cases: junction-empty-print-name
env casing
Section titled “env casing”Windows env names are case-insensitive but JS objects are not; Path and PATH can coexist and fight.
Cases: env-path-vs-PATH-casing
env derived identity
Section titled “env derived identity”USERDOMAIN/USERNAME env vars are writable, unreliable identity sources; workgroup machines put the computer name in USERDOMAIN.
Cases: env-domain-principal · wslenv-shared-with-host
errorrecord format
Section titled “errorrecord format”Formatting an ErrorRecord (Out-String) renders multi-line error views including position/script text, multiplying one line into many.
Cases: out-string-multiplies-stderr
execution policy gate
Section titled “execution policy gate”Execution policy gates script FILES (.ps1, -File) while in-memory command text bypasses it.
Cases: npm-ps1-not-comspec · execution-policy-file-block
exit code propagation
Section titled “exit code propagation”Exit codes cross process/host boundaries by convention, not guarantee: hosts, wrappers, and CI steps each apply their own rule.
Cases: exit-code-vs-dollar-q · explorer-exits-one · perl-alarm-raw-wait-status · pwsh-leaks-lastexitcode · start-process-no-lastexitcode · startup-artifact-is-not-a-process
expression vs command mode
Section titled “expression vs command mode”PowerShell chooses command or expression parsing from the first token of a line. A leading quoted string selects expression mode, so the string is a value and the argument after it is a syntax error, regardless of whether the path names an executable.
Cases: ps-quoted-path-is-expression
extension dispatch
Section titled “extension dispatch”powershell/pwsh -File dispatches on filename extension; non-.ps1 files are rejected before parsing.
Cases: ps-file-extension-dispatch
file url scheme path
Section titled “file url scheme path”A file: URL’s pathname keeps the leading slash and treats the drive letter as the first segment (/D:/a/…), which is a valid URL path but not a Windows filesystem path; only fileURLToPath converts and decodes it.
Cases: file-url-pathname-drive-slash
flush needs write access
Section titled “flush needs write access”On Windows fsync is FlushFileBuffers, which requires a handle opened with GENERIC_WRITE; a read-only handle is refused with ERROR_ACCESS_DENIED (EPERM), where POSIX fsync accepts any descriptor for the file.
Cases: fsync-readonly-handle-eperm
exit races a closing handle
Section titled “exit races a closing handle”An immediate process exit tears the runtime down without waiting for libuv to finish closing handles; a handle still in the closing state trips an assertion, which Windows surfaces as a fastfail while POSIX teardown absorbs the same race silently.
Cases: process-exit-fastfail-0xc0000409
homedir uses userprofile
Section titled “homedir uses userprofile”On Windows, os.homedir() reads USERPROFILE rather than HOME, so a test or process that overrides HOME alone still resolves the real user profile as its home.
Cases: homedir-escapes-test-sandbox
host path separator
Section titled “host path separator”node:path join and separator behavior follows the host OS unless posix or win32 is selected explicitly, so host-built fixture paths can disagree with paths for a simulated platform.
Cases: node-path-host-delimiter
host vs pipeline
Section titled “host vs pipeline”Write-Host and return semantics: host output bypasses the success pipeline, and functions emit every uncaptured value.
Cases: return-does-not-mean-return · start-process-no-lastexitcode · write-host-not-success-stream
hosted runner variance
Section titled “hosted runner variance”A shared windows-latest job runs several Bun/Node pools on one machine, so identical work takes 2x or more longer from one run to the next (8.5 s vs 18.7 s measured for one three-child test). Any budget sized from a single observation, and especially from a developer laptop, is inside that spread.
Cases: test-budget-sized-from-local-timing
iex session
Section titled “iex session”Invoke-Expression runs text in the CURRENT session: exit kills the caller’s host, and parameters cannot be forwarded.
Cases: piped-iex-drops-params · irm-iex-kills-host
inert file association
Section titled “inert file association”A file extension is registered but its association carries no executing verb, so shell-level dispatchers resolve it, do nothing and return success, while CreateProcess refuses the same file outright.
Cases: dot-sh-association-exits-zero
json depth default
Section titled “json depth default”ConvertTo-Json defaults to -Depth 2, replacing deeper data with type names; 5.1/7.0 truncate silently, 7.1+ warn.
Cases: convertto-json-depth-two
locale preferred encoding is the ANSI codepage
Section titled “locale preferred encoding is the ANSI codepage”Python text mode without an explicit encoding decodes with the locale preferred encoding, which on Windows is the ANSI codepage rather than UTF-8, and UTF-8 mode changes what that function reports without changing what native children emit.
Cases: python-subprocess-locale-encoding
localized tool output
Section titled “localized tool output”Windows built-in command-line tools translate their column headings, status words, and error messages to the system UI language, so only structure and exit codes are stable; matching English substrings tests the machine’s language rather than its state.
Cases: localized-cli-output-parsing
loose string escape layer
Section titled “loose string escape layer”A loose string or config layer consumes a backslash as an escape introducer and keeps the letter after it, so a Windows path silently loses its separators. A strict parser refuses the same input instead, which is why the failure arrives late.
Cases: config-string-eats-windows-path
mandatory file locking
Section titled “mandatory file locking”Windows enforces file locks at the OS level: a handle opened without FILE_SHARE_DELETE blocks deletes and renames until it closes, where POSIX unlink only removes a name and lets the data outlive its last reference.
Cases: killed-run-contaminates-next-run · async-child-holds-dir-after-stop · atomic-rename-loses-to-scanner · cwd-locked-cannot-unlink · unlink-while-open-ebusy
MAX_PATH is an API ceiling, not a filesystem limit
Section titled “MAX_PATH is an API ceiling, not a filesystem limit”Win32 caps a pathname at 260 characters including drive, separators, and the terminating NUL, and directory creation reserves twelve more, so a path NTFS would store is refused by the API unless the caller uses the extended-length prefix or opts in with both the registry value and a long-path-aware manifest.
Cases: max-path-260
msys path conversion
Section titled “msys path conversion”MSYS2, which Git for Windows is built on, rewrites arguments that look like POSIX paths into Windows paths when launching a non-MSYS child. A lone switch such as /c is indistinguishable from a one-character root and arrives as C:/.
Cases: msys-rewrites-slash-args
native argv rebuild
Section titled “native argv rebuild”PowerShell historically rebuilds one command-line string for native processes, re-quoting heuristically; quotes and empty args are lost.
Cases: backslash-quote-ends-span · oss-native-arg-quoting · prose-as-unknown-flags
no POSIX process group
Section titled “no POSIX process group”Windows offers termination of one process or of a live parent-PID tree, with no group you opted into, so killing a child orphans its descendants while a tree kill sweeps up any caller that happens to descend from the target.
Cases: killed-run-contaminates-next-run · kill-hits-one-pid-or-the-whole-tree
nonspace prefix kills label
Section titled “nonspace prefix kills label”A batch label is recognised when its colon is the first non-whitespace character of the line. Spaces and tabs are tolerated; a BOM is not whitespace, so it turns the label into a command cmd.exe must parse.
Cases: cmd-bom-displaces-label
NTFS last-access disabled
Section titled “NTFS last-access disabled”NTFS does not update a file’s last-access time on ordinary reads: client SKUs have had NtfsDisableLastAccessUpdate=1 since Vista/7, and Windows 10 1803+/Server 2019+ use a “system managed” mode (fsutil DisableLastAccess = 2/3) that enables updates only on small volumes and coalesces them to once per hour. atime is therefore not evidence that a read happened.
Cases: ntfs-atime-disabled-by-default
output truthiness
Section titled “output truthiness”A native command in a PowerShell expression evaluates to its captured OUTPUT; if() branches on output presence, not exit code.
Cases: if-nativecmd-truthiness
path delimiter
Section titled “path delimiter”PATH list separator is host-dependent (‘;’ Windows, ‘:’ POSIX); colon-joined lists corrupt drive-letter entries.
Cases: node-path-host-delimiter · path-colon-not-delimiter
pathext resolution
Section titled “pathext resolution”Windows resolves extensionless command names by walking PATH entries and PATHEXT extensions in order; results differ from POSIX execvp and between resolvers.
Cases: get-command-where-disagree · npm-ps1-not-comspec · spawn-npm-enoent-einval · timeout-is-not-a-command-wrapper · path-dot-hijacks-bare-npm · pathext-bare-name-enoent · pathext-exe-beats-cmd
percent-star unshifted
Section titled “percent-star unshifted”cmd.exe expands %* to the command tail exactly as it arrived, and shift renumbers only %1 through %9. A batch file that must drop its first argument therefore has no correct expansion, and falls back to positional forwarding with its eight-argument ceiling.
Cases: cmd-star-ignores-shift
pipeline chain ops
Section titled “pipeline chain ops”&& and || are PowerShell 7.0+ pipeline chain operators; 5.1 treats them as parser errors.
Cases: ps51-no-and-and
posix dev null
Section titled “posix dev null”/dev/null is a POSIX device path; Windows treats it as a relative file path under the current drive.
Cases: dev-null-redirect
posix inline env
Section titled “posix inline env”VAR=value cmd per-command environment is POSIX shell syntax; cmd.exe executes the literal token instead.
Cases: cmd-posix-env-prefix
prose as argument
Section titled “prose as argument”English connectors like ‘and’ between commands parse as positional arguments of the first command.
Cases: english-and-not-separator
PATH entries may be quoted
Section titled “PATH entries may be quoted”A Windows PATH entry may be wrapped in quotes so a directory name can contain a semicolon, which forces correct parsers to be quote-aware; an unmatched quote then opens a span that swallows every later entry into one fictional path.
Cases: path-unmatched-quote-swallows
registry env snapshot
Section titled “registry env snapshot”Environment variables live in the registry; a process gets a merge snapshot at creation and never sees later writes.
Cases: envpath-pollutes-user · session-path-stale
rem parameter substitution
Section titled “rem parameter substitution”REM and :: suppress command parsing, so operators and quotes inside a batch comment are inert. They do not suppress batch parameter substitution, which runs earlier, so a %~ form the parser cannot resolve aborts the script instead of being skipped.
Cases: cmd-rem-substitutes-parameters
backslash is data inside a URL path
Section titled “backslash is data inside a URL path”A general-purpose URL type percent-encodes a backslash because it is an ordinary path character rather than a separator; only implementations following the WHATWG special-scheme rule convert it, so the same conversion is correct in one language and broken in another.
Cases: file-url-encodes-backslash
config command line is parsed by sh before the program is found
Section titled “config command line is parsed by sh before the program is found”Git runs commands supplied through configuration by handing them to its bundled sh, so the configured value is a shell command line rather than an argv vector. Backslashes in a Windows path are consumed as escape characters before any program lookup happens, and the resulting ‘command not found’ is absorbed by whatever fallback the calling feature defines.
Cases: git-merge-driver-sh-escapes
statement terminator
Section titled “statement terminator”‘;’ terminates a PowerShell statement; joining fragments of ONE call with ‘;’ splits it into broken statements.
Cases: cmd-c-newline-not-separator · join-semicolon-splits-startprocess
stream wrapping
Section titled “stream wrapping”5.1 wraps redirected native stderr lines in ErrorRecord objects, converting output into error-stream objects.
Cases: native-stderr-errorrecord · out-string-multiplies-stderr
strictmode contract
Section titled “strictmode contract”Set-StrictMode changes property access on missing members from returning null to throwing.
Cases: strictmode-missing-property
string interpolation
Section titled “string interpolation”Double-quoted PowerShell strings interpolate $tokens; backslash is not an escape — backtick is.
Cases: dollar-backslash-vars · dq-regex-interpolates · prose-as-unknown-flags
TCP control block outlives the socket
Section titled “TCP control block outlives the socket”Windows retains the transmission control block for a closed socket so the endpoint stays unbindable, and its SO_REUSEADDR waives that state by also permitting an active listener to be hijacked, so runtimes refuse to set it and the POSIX escape hatch is unavailable rather than merely ineffective.
Cases: tcp-tcb-survives-listener
test resource outlives file
Section titled “test resource outlives file”A test finishes without clearing its deadline or awaiting request/socket teardown, leaving timers or handles active in the shared test process after the file ends.
Cases: aside-sync-resources-outlive-isolate-file
cmd.exe cannot hold a UNC current directory
Section titled “cmd.exe cannot hold a UNC current directory”The current directory is drive-relative in cmd.exe’s model, so a UNC path cannot be one; started in a UNC directory it warns and silently relocates to the Windows directory, and every batch shim that hops through it inherits the wrong working directory.
Cases: cmd-unc-cwd-not-supported
a UNC path may be served by a non-NTFS provider
Section titled “a UNC path may be served by a non-NTFS provider”A UNC root can be backed by a provider with entirely different semantics from NTFS, such as the WSL 9P filesystem, so operations that assume a Windows security descriptor fail with access-denied on a path that reads and lists normally.
Cases: wsl-unc-rejects-nt-acl
text-mode write translates newlines
Section titled “text-mode write translates newlines”CPython text I/O applies universal newlines when writing as well as reading, so a lone line feed becomes the platform terminator wherever a TextIOWrapper sits in the path, including inside a subprocess pipe opened in text mode.
Cases: python-textio-newline-translation
unowned child lifetime
Section titled “unowned child lifetime”A spawned child whose promise or handle is dropped keeps running after its parent decides it is finished; Windows has no process group to tie the two, so the child’s open handles outlive every shutdown step the parent awaited.
Cases: killed-run-contaminates-next-run · test-budget-sized-from-local-timing · async-child-holds-dir-after-stop
win32 file id number rounding
Section titled “win32 file id number rounding”Bun 1.4.0 Windows stats expose 64-bit dev and ino values as JavaScript numbers, where distinct file IDs can round to the same represented value.
Cases: bigint-file-identity-on-windows
win32 path normalization
Section titled “win32 path normalization”Win32 trims trailing dots/spaces from paths at the API boundary; different runtimes normalize differently, so existence checks disagree.
Cases: esm-is-main-file-url · test-path-trailing-whitespace · basename-split-slash-only · zip-entry-drive-letter-escapes
wsl launcher path translation
Section titled “wsl launcher path translation”The WSL launcher on PATH is not a POSIX shell. It starts a guest with no C: drive and consumes the backslashes of a Windows path handed to it, so the path cannot resolve. Its callers have reported it exiting 0 on that failure.
Cases: bash-on-path-may-be-wsl