-
Notifications
You must be signed in to change notification settings - Fork 585
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
Passing arguments with '=' inside does not work as expected #1226
Comments
Seems to be a problem with the "old" argument parsing, |
@inosik yes, that seems to work fine. One question about this: I also updated my test code to the following:
When using the |
FAKE handles it's parameters as environment variables. In fact, the BuildParam functions call the There might be some clarification needed about this, though. I remember asking the same questions as you, and ended looking up the source. |
Oh, that's really not what I expected :) I guess in most cases that's a valid approach, but when having to pass in secrets to the build process it would be prefered not to have them set as env variables. Especially now that more and more are using shared/semi-shared build services. I haven't looked at the source yet, but it do look like FAKE either cleans up these variables after it's done, or start up an internal process where they are set, because I'm unable to see them after the build is done, so that's good. |
FAKE sets them as environment variables in process scope. It's children processes ( |
Thanks @inosik, That makes it more workable :) I think I can live with that for now, though I do think that this whole part should maybe have had a look-over at some point, if nothing else on the documentation side, since it was at least a bit confusing to me. I can't help much with the coding part of this (F# isn't my strongest language), but I'll see if I can't add a PR to expand the documentation on this. |
Description
I'm trying to pass in an argument from my build system to the build script. This argument is a BASE64 string. It looks something like this: c3VwZXJzZWNyZQ==. When the argument reaches my code, it's missing the trailing == (the padding).
Repro steps
FAKE.exe repro.fsx Test secret=c3VwZXJzZWNyZQ==
Expected behavior
Expected the line
SECRET c3VwZXJzZWNyZQ==
to be printed, showing that the value is correct with what has been passed in.Actual behavior
SECRET c3VwZXJzZWNyZQ
is printed (notice the missing ==).Known workarounds
I could manually pad the base64 string to the correct length, but that's messy. I've tried all sorts of escaping, without any luck.
I could also temp store it in an env variable I assume, but since the value is a secret, I'd rather not.
Related information
The text was updated successfully, but these errors were encountered: