Sequoia / clijs

Nodeschool lesson-set for learning to build shell tools with javascript
GNU General Public License v3.0
5 stars 0 forks source link

`require` for reading json doesn't work well w/o absolute path from shell #11

Open Sequoia opened 9 years ago

Sequoia commented 9 years ago

otherwise user has to normalize the path first. If they don't do this & just require(argv._[0] they're liable to get a frustrating/confusing "could not find path"

Is there a better way?

Sequoia commented 9 years ago

I'm wondering if a quick lesson on this wouldn't be useful. I think this could be a frustrating stumbling block & a lesson to address resolving paths on filename args would be a very short/quick one (which is gr8)

ghost commented 9 years ago

I'll make a lesson for this, don't you worry !