Skip to content

Commit

Permalink
Fix for fsprojects#502. Make the build script args part of the --fsia…
Browse files Browse the repository at this point in the history
…rgs switch the value of an environemnt variable named fsiargs-buildscriptargs. This is the best solution to make this restricted set of args explicitly available to the build script.
  • Loading branch information
bentayloruk committed Jul 23, 2014
1 parent b65e9dc commit c601535
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/FakeLib/FSIHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,13 @@ let runBuildScriptWithFsiArgsAt workingDirectory printDetails (FsiArgs(fsiOption
for (k,v) in args do
Environment.SetEnvironmentVariable(k, v, EnvironmentVariableTarget.Process)

// Create an env var that only contains the build script args part from the --fsiargs (or "").
Environment.SetEnvironmentVariable("fsiargs-buildscriptargs", String.Join(" ", scriptArgs))

let fsiConfig = FsiEvaluationSession.GetDefaultConfiguration()

let commonOptions =
[ "fsi.exe"; "--noninteractive" ] @ fsiOptions @ scriptArgs
[ "fsi.exe"; "--noninteractive" ] @ fsiOptions
|> List.toArray

let sbOut = new Text.StringBuilder()
Expand Down

0 comments on commit c601535

Please sign in to comment.