sindresorhus / time-grunt

Display the elapsed execution time of grunt tasks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Callback is not called when exit

dickeylth opened this issue · comments

I've tried using callback with time-grunt, and found that it may only work when I use CTRL+C force exit:

~/dev/gitlab/grunt-test grunt
Running "test" task
>> test...
^C

Execution Time (2017-08-25 09:45:29 UTC+8)
loading tasks   17ms  ▇▇▇▇▇ 3%
test           569ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 97%
Total 587ms

[ [ 'loading tasks', 17 ], [ 'test', 569 ] ]
~/dev/gitlab/grunt-test grunt
Running "test" task
>> test...
>> test task done.

Done.


Execution Time (2017-08-25 09:45:31 UTC+8)
loading tasks   14ms  ▇▇▇ 2%
test           677ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 98%
Total 692ms

environment info

  • MacOS Serria 10.12.6 (16G29)
~/dev/gitlab/grunt-test(master ✗) tnpm -v
tnpm@2.28.2 (/usr/local/lib/node_modules/tnpm/bin/tnpm)
npm@2.15.12 (/usr/local/lib/node_modules/tnpm/node_modules/npm/lib/npm.js)
node@6.10.3 (/usr/local/bin/node)
npminstall@2.30.2 (/usr/local/lib/node_modules/tnpm/node_modules/npminstall/lib/index.js)
prefix=/usr/local (load prefix from: $ npm config get prefix)
darwin x64 16.7.0

MVP repo: https://github.com/dickeylth/time-grunt-issue

Seems the log is hooked, close issue.