diff --git a/docs/guide/core-commandlineparsing.md b/docs/guide/core-commandlineparsing.md index 74ec49597d7..e1795888f52 100644 --- a/docs/guide/core-commandlineparsing.md +++ b/docs/guide/core-commandlineparsing.md @@ -38,6 +38,8 @@ match DocoptResult.tryGetArgument "-m" results with *Note the following links are permalinks to old commits. They are intended only as examples. You are encouraged to look at the current version too, because it's likely to have been updated.* +See also: https://fake.build/guide/core-targets.html#Script-with-arguments + A more sophisticated example can be found in the fake runner: [src/app/Fake.netcore/Program.fs#L204-L259](https://github.com/fsharp/FAKE/blob/64d871f5065412fe7b233025e454ccf3b89e46d7/src/app/Fake.netcore/Program.fs#L204-L259) Or the target module: diff --git a/docs/guide/core-targets.md b/docs/guide/core-targets.md index 2bf5d9ec9a6..5af859263ed 100644 --- a/docs/guide/core-targets.md +++ b/docs/guide/core-targets.md @@ -89,6 +89,12 @@ Now we have the following options: ## Script with arguments +If you don't call `Target.initEnvironment()` before you use the `Environment` module, +then FAKE will only use system and inline environment variables +(e.g. Windows: `set mything=123`) instead of parsing the command line `-e` params. + +If you want multiple environment arguments, you can do `-e a=1 -e b=2`. + Example: ```fsharp