ryp ls recurses wildly #1

Closed
pekim opened this Issue Feb 11, 2011 · 2 comments

Projects

None yet

2 participants

@pekim
pekim commented Feb 11, 2011

If node_modules contains directories, then ryp ls works fine
.
|-- node_modules
-- xxx | |-- lib | |-- my-module.js
`-- package.json

The output is:
./node_modules/xxx

However if there is a js module directly in node_modules, then ryp ls recurses forever.
.
|-- node_modules
`-- my-module.js

The output is:
./node_modules/my-module.js
./node_modules/my-module.js/node_modules/my-module.js
./node_modules/my-module.js/node_modules/my-module.js/node_modules/my-module.js
./node_modules/my-module.js/node_modules/my-module.js/node_modules/my-module.js/node_modules/my-module.js
...

I think that the problem is that is trying to cd into the js file.

As node (0.4.0) supports js modules directly in node_modules it would be nice if ryp tolerated them.

pekim commented Feb 11, 2011

Only recursing in to directories seems to work. So instead of
( cd "$i" &>/dev/null ; ls_ $pref/$i ) || true
do
if [ -d $pref/$i ]; then
( cd "$i" &>/dev/null ; ls_ $pref/$i ) || true
fi

My bash skills are weak, so there's probably a better solution.

Owner
isaacs commented Feb 11, 2011

Closed by b4461f4 Don't cd into files

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment