lib.js¶
Utility functions and constants used by the os-specific-runner action.
Functions¶
- formatShell(template, ...args)¶
Replaces {0}, {1}, … placeholders in a shell template with the provided args.
- Arguments:
template (string)
args (string)
- Returns:
string –
- getTempWorkingDir(working_directory)¶
Returns the absolute temp working directory for the given working_directory input. Uses os.tmpdir() so it works cross-platform (Linux, macOS, Windows).
- Arguments:
working_directory (string)
- Returns:
string –
Constants¶
- fileExtensions¶
type: Object.<string, string>
Maps shell name to the file extension used for the temporary script file.
- builtInShells¶
type: Object.<string, string>
Maps built-in shell names to their command templates. The placeholder
{0}is replaced with the path to the temporary script file.