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

wikidata-cli alias does not work #49

Closed
almereyda opened this issue Jan 10, 2018 · 5 comments
Closed

wikidata-cli alias does not work #49

almereyda opened this issue Jan 10, 2018 · 5 comments

Comments

@almereyda
Copy link
Contributor

almereyda commented Jan 10, 2018

After the thankful implementation of #42, this still does not work with a fresh global install:

λ wikidata-cli --help
/home/ya/.nvm/versions/node/v8.9.4/bin/wikidata-cli: Zeile 2: ./bin/wd: No such file or directory

This may be linked with #21 and #25.

maxlath added a commit that referenced this issue Jan 11, 2018
as the implementation wasn't working (see #49)
and I can't find a work around
@maxlath
Copy link
Owner

maxlath commented Jan 11, 2018

the problem is that the ./bin/wikidata-cli implementation was failing: the script was attempting to refer to a relative file from the project root but won't work when not in the project folder...
So I removed ./bin/wikidata-cli (d0df064), and the only alternative I can think of is to suggest you to add an alias:

alias wikdata-cli="/home/ya/.nvm/versions/node/v8.9.4/bin/wd"

@almereyda
Copy link
Contributor Author

almereyda commented Jan 16, 2018

I guess d0df064 was not as complete as neccessary.

$ npm i -g wikidata-cli
/home/ya/.nvm/versions/node/v8.9.3/bin/wd -> /home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wd
npm ERR! path /home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wikidata-cli
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/ya/.nvm/versions/node/v8.9.3/lib/node_modules/wikidata-cli/bin/wikidata-cli'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ya/.npm/_logs/2018-01-16T22_04_04_116Z-debug.log

I also think this alias would be the first in the world to actually extend a command string, and make it artificially longer, instead of shortening it ;)

@almereyda
Copy link
Contributor Author

Sorry for having caused this with #42 in the first place.

maxlath added a commit that referenced this issue Jan 18, 2018
@maxlath
Copy link
Owner

maxlath commented Jan 18, 2018

I made a patch 224c7e9 and published it as v6.0.4

@almereyda
Copy link
Contributor Author

I'm happy with wd so far. A working PR may be provided in the future independently.

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