electrode-io / xarc-run

npm run scripts concurrently and serially, and more.
Apache License 2.0
42 stars 9 forks source link

argv is at 'this.process.argv' not 'this.argv' #9

Closed soundyogi closed 6 years ago

soundyogi commented 6 years ago

Title says it. this.argv is undefined for me.

https://github.com/jchip/xclap/blob/master/REFERENCE.md#task-options

We use xclap-cli is that the reason? Thanks!

jchip commented 6 years ago

you are probably using fat arrow function for your task. this for fat arrow functions behave differently than normal function.

soundyogi commented 6 years ago

Of Course! Because they dont have 'this' and it points to the parent context!

I am stupid!

Thanks!