Crate invoke_script
source ·Structs
- Result of successfully executing a script. (Exit code could still be non 0)
Enums
- Errors that might occur while trying to interpret the hash-bang line as a command
- An error in finding a path that matches the command the user wants to run
- Errors we might encounter when running a script
Functions
- Returns a mapping of script base names to file paths in
dir
. Scripts that do not start with a hash-bang line are skipped - Reads the first line of the file at
path
as a hash-bang directive and returns the corresponding command that executes the file using that directive. - Executes a script as a child process and waits for it to finish. The file does not actually need to be executable. We’ll use whatever interpreter is specified with the hash-bang directive to execute it
- Search for a file or directory named
name
in the ancestors ofstart
.