OpamStd.SysSourcetrue if stdout is bound to a terminal
true if stdin is bound to a terminal
Queried lazily, but may change on SIGWINCH
The user's home directory. Queried lazily
The /etc directory
The system directory (Windows only)
The output of the command "uname", with the given argument. Memoised.
Append .exe (only if missing) to executable filenames on Windows
The different families of shells we know about
The separator character used in the PATH variable (varies depending on OS)
Splits a PATH-like variable separated with path_sep. More involved than it seems, because there may be quoting on Windows. By default, it returns the path cleaned (remove trailing, leading, contiguous delimiters). Optional argument clean permits to keep those empty strings.
For native Windows builds, returns `Cygwin if the command is a Cygwin- compiled executable, `CygLinked if the command links to a library which is itself Cygwin-compiled or `Native otherwise.
Note that this returns `Native on a Cygwin-build of opam!
Both cygcheck and an unqualified command will be resolved using the current PATH.
Like Stdlib.at_exit but with the possibility to call manually (eg. before exec())
Calls the functions registered in at_exit. Unneeded if exiting normally
Indicates intention to exit the program with given exit code
Indicates intention to exec() the given command (parameters as per Unix.execvpe), after proper finalisations. It's the responsibility of the main function to catch this, call exec_at_exit, and Unix.execvpe.
Raises Exit i
type exit_reason = [ | `Success| `False| `Bad_arguments| `Not_found| `Aborted| `Locked| `No_solution| `File_error| `Package_operation_error| `Sync_error| `Configuration_error| `Solver_failure| `Internal_error| `User_interrupt ]Raises Exit, with the code associated to the exit reason