Logo Partas.TypeProvider

Proc Module

Running of external command line tools. Shared by the providers that answer questions the compiler cannot answer alone - git state, MSBuild evaluation - without taking a library dependency on the tool. Nothing here throws: a missing executable, a timeout or a crash all surface as `None`, because a provider that throws takes the whole provided type down with it.

Types

Type Description

Result

Functions and values

Function or value Description

exists executable probeArguments

Full Usage: exists executable probeArguments

Parameters:
    executable : string
    probeArguments : string

Returns: bool

Whether `executable` can be started at all

executable : string
probeArguments : string
Returns: bool

tryOutputWith environment timeoutMs workingDirectory executable arguments

Full Usage: tryOutputWith environment timeoutMs workingDirectory executable arguments

Parameters:
    environment : (string * string) list
    timeoutMs : int
    workingDirectory : string
    executable : string
    arguments : string

Returns: string option
environment : (string * string) list
timeoutMs : int
workingDirectory : string
executable : string
arguments : string
Returns: string option

tryRun timeoutMs workingDirectory executable arguments

Full Usage: tryRun timeoutMs workingDirectory executable arguments

Parameters:
    timeoutMs : int
    workingDirectory : string
    executable : string
    arguments : string

Returns: Result option
timeoutMs : int
workingDirectory : string
executable : string
arguments : string
Returns: Result option

tryRunWith environment timeoutMs workingDirectory executable arguments

Full Usage: tryRunWith environment timeoutMs workingDirectory executable arguments

Parameters:
    environment : (string * string) list
    timeoutMs : int
    workingDirectory : string
    executable : string
    arguments : string

Returns: Result option

Low resilience execution of a tool, with quick bail-out and fallback to None. stdin is redirected and closed immediately: a tool that decides to prompt gets EOF instead of blocking forever on a console that is not there.

environment : (string * string) list
timeoutMs : int
workingDirectory : string
executable : string
arguments : string
Returns: Result option

Type something to start searching.