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
Functional tasks do not have meaningful name #828
Comments
Hey, We did try to create a custom name using placeholders, but the problem was that the function was evaluated multiple times. This was problematic for when the task had side-effects. Feel free to suggest a good way of generating the name. We have the full command string (including arguments) at that point, but it can be very long depending on how many staged files there are. |
This is basically where we generate the name: I guess we could try splitting from the first stage filename, since we know that, instead of the first space. |
Sure, let me try putting together a PR for that. Would it also make sense to strip common package runner commands like |
This has been fixed in 10.2.5 by using the full command string, and truncating it to fit on a single console line. |
Description
For tasks defined as a function, the console output doesn't really show a meaningful name (because it emits only the first word of the command). Having a way to name tasks in the config (requested before in #410) would solve this issue, as well as for tasks that are not functional, but may have long or confusing commands. For example,
npx --no-install eslint --quiet --fix
could be shown in console output as simplyeslint --quiet --fix
if we could provide a custom name.Steps to reproduce
Here's an example, for this config:
The console output I currently get:
What I'd like:
Maybe even the ability to get rid of
[Function]
if specifying a custom name.The text was updated successfully, but these errors were encountered: