-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Powershell 2.0 inline script does not support passing arguments #4971
Comments
can you add the macros into the inline script itself? |
Surely can. Discoverability plummets and integration with task groups that can automatically discover those arguments and make them task group input properties configurable by the user completely vanishes though. |
OK sounds like a bug in task groups then. I'm not sure why it would treat the inline script input differently. |
You do not think the arbitrary inconsistency in uex between inline and file path scripts is a bug regardless? Not sure what was the reasoning behind providing Arguments for one and not the other, but the only thing that makes sense to me is to either have it in both, or remove it altogether. |
Funny! If I do configure the task |
The reason they are different is because you can simply put the variables in the inline script which should be a lot simpler than dealing with arguments. In the case of the file you have no option to do that. |
I'd say the current experience is still more confusing than having it available in both, even if the variables can be used in the inline script directly, since that feature isn't easily discoverable (that is, it isn't even a working PS script if you try to run it on your machine with those variables in place), whereas using arguments makes for way easier testing too before uploading. |
@iyerusad you can use the macro syntax alternatively, in yaml you can also pass via the env dictionary. env dictionary will come to web designer in the future. |
The
File Path
-based script allows passing in arguments:The
Inline
one does not, however:This significantly reduces its usefulness when used in task groups that can automatically discover configurable inputs from arguments used in a script.
Relevant PR: #4578
The text was updated successfully, but these errors were encountered: