Skip to content
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

ryp ls recurses wildly #1

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

ryp ls recurses wildly #1

pekim opened this issue Feb 11, 2011 · 2 comments

Comments

@pekim
Copy link

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
Copy link
Author

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.

@isaacs
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants