Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

Arguments

Module for working with an Arguments instance

Functions and values

Function or valueDescription
append s a
Signature: s:seq<string> -> a:Arguments -> Arguments

Append all arguments after the current arguments

appendIf value paramName a
Signature: value:bool -> paramName:string -> a:Arguments -> Arguments

Append an argument to a command line if a condition is true.

appendNotEmpty paramName paramValue a
Signature: paramName:string -> paramValue:string -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is not null or empty

appendOption paramName paramValue a
Signature: paramName:string -> paramValue:string option -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is Some.

ofList(a)
Signature: a:string list -> Arguments

Create a arguments instance from a list.

toArray(a)
Signature: a:Arguments -> string []

Convert the arguments instance to a string array

toLinuxShellCommandLine(a)
Signature: a:Arguments -> string

Escape the given argument list according to a unix shell (bash)

toList(a)
Signature: a:Arguments -> string list

Convert the arguments instance to a string list

toStartInfo(a)
Signature: a:Arguments -> string

Create a new command line string which can be used in a ProcessStartInfo object. If given, returns the exact input of OfWindowsCommandLine otherwise ToWindowsCommandLine (with some special code for mono) is used.

toWindowsCommandLine(a)
Signature: a:Arguments -> string

This is the reverse of https://msdn.microsoft.com/en-us/library/17w5ykft.aspx

withPrefix s a
Signature: s:seq<string> -> a:Arguments -> Arguments

Append the given arguments before all current arguments