-
Notifications
You must be signed in to change notification settings - Fork 227
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
pub global run should expose invocation metadata #1234
Comments
<img src="https://avatars.githubusercontent.com/u/4865287?v=3" align="left" width="48" height="48"hspace="10"> Comment by lrhn |
<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="48" height="48"hspace="10"> Comment by seaneagan I just realized this is a similar request to issue #1020 that I previously posted. However, the use case is different, and now that the Also, it needs to handle |
<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="48" height="48"hspace="10"> Comment by seaneagan Yet another use case: |
We don't see the big usefulness of this. Closing as wontfix. Please open a new issue with a described use case if this is still important. |
<img src="https://avatars.githubusercontent.com/u/444270?v=3" align="left" width="96" height="96"hspace="10"> Issue by seaneagan
Originally opened as dart-lang/sdk#22098
If a script has a renamed executable like so:
executables:
format: dartformat
Then it can be invoked in two different ways:
pub global run dart_style:format
dartformat
It would be useful if such apps can detect which way they were invoked to display appropriate help text, error messages, etc.
It could be exposed via either of:
* Platform.environment['PUB_GLOBAL_RUN_INVOCATION']
The binstubs would set this before calling
pub global run
, and then `pub global run would initialize it using the invocation it received if it was not already set by the binstub.So it's value would be e.g. "dartformat" or "pub global run dart_style:format"
The text was updated successfully, but these errors were encountered: