You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I just realized this is a similar request to issue #19580 that I previously posted.
However, the use case is different, and now that the pub [global] run stuff has settled down, I believe the problem and solution and pretty clear.
Also, it needs to handle pub run foo ... as well, so probably just PUB_RUN_INVOCATION, which in the case of pub run foo ... would be set to pub run foo
This issue was originally filed by @seaneagan
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: