Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide env var access to --fsiargs build script args so works on FAKE 3 #508

Merged
merged 2 commits into from
Jul 29, 2014

Conversation

bentayloruk
Copy link
Contributor

This is my proposal to fix #502 so --fsiargs is workable again in FAKE 3. See #502 for more details.

…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.
@forki
Copy link
Member

forki commented Jul 24, 2014

what's the difference to normal build script parameters?

@bentayloruk
Copy link
Contributor Author

Sorry, I wasn't notified of your comment! I just randomly came to have a look.

tl;dr - the --fsiargs switch previously merged, is broken in FAKE 3. This is the fix.

The longer story...

My previous merged PR with the CLI changes and --fsiargs #455, was the result of my desire to be able to access the specific set of arguments passed to the build script, from within my build script. These and only these arguments. The reason for this, is that I have build scripts that use UnionArgParser, and UAP will not ignore unrecognised arguments.

At the time, all build script args were put in to environment variables (this is still supported). I thought of changing UAP to access these, but it would still not work as there could be user and machine level vars in the dictionary too (hence the set was not explicitly limited). Therefore, I added support for them to passed to FSI explicitly (with the --fsiargs switch). However, --fsiargs was broken in FAKE 3 (as I can see no way of splitting the FSI options and actual build script args when setting up the FsiEvaluationSession), so I need some other way to access just the build script args. Hence this PR!

forki added a commit that referenced this pull request Jul 29, 2014
Provide env var access to --fsiargs build script args so works on FAKE 3
@forki forki merged commit f8745e4 into fsprojects:master Jul 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants