Skip to main content

Module platform_shell

Module platform_shell 

Source
Expand description

The shell a command line runs in: sh -c on Unix, Windows PowerShell on Windows (always present, unlike sh). The command-effect checks are written for POSIX shells and fail closed: a PowerShell line they cannot read as a known observation or local work is treated as unknown, so it asks first.

Constants§

POWERSHELL_EXIT_EPILOGUE
Appended to every PowerShell script so the shell exits as sh does: with the last program’s own exit code. -Command alone turns any failing last step into 1, so python x.py exiting 7 read as 1.

Functions§

shell_available
Whether this platform’s shell is there to run commands.
shell_command
script run by this platform’s shell.