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

Spotgen Answers to Any and Every Command with "File or Directory not Found" #7

Closed
edo9k opened this issue Oct 30, 2017 · 12 comments
Closed

Comments

@edo9k
Copy link

edo9k commented Oct 30, 2017

No description provided.

@epsil
Copy link
Owner

epsil commented Nov 6, 2017

Hi edo9k.

I am not able to reproduce the problem. Could you please tell me how you installed spotgen?

@edo9k
Copy link
Author

edo9k commented Nov 6, 2017

Thanks for replying. I installed it via npm install, as instructed on the github page.

Image of spotgen's weird behavior

@epsil
Copy link
Owner

epsil commented Nov 6, 2017

Thanks for the clarification. And from the screenshot I gather that you are running some version of Linux (Ubuntu?), correct?

Let me run some tests on a Linux laptop I have lying around, and then I'll get back to you.

@epsil
Copy link
Owner

epsil commented Nov 6, 2017

It's a problem with line endings. index.js has DOS-style line endings (CRLF), which confuses the interpreter.

@edo9k
Copy link
Author

edo9k commented Nov 6, 2017

It's how persistent some problems can be. I'll try to grep/replace the line endings in this file tomorrow and I'll let you know how it goes in this thread. Thank you!

@epsil
Copy link
Owner

epsil commented Nov 8, 2017

I would have pushed a fix already, but Git does some magic where the line endings are automatically translated between different conventions on different systems:

  • Windows (DOS): CRLF (\r\n)
  • Linux (Unix): LF (\n)
  • OS X (pre-Unix): CR (\r)

This "helpful behavior" actually makes it rather difficult to reproduce the problem. Specifically:

  • When I check out the code with Git, I get Unix line endings -- whether I'm on Windows, Linux or OS X.
  • When I run npm install on Linux, then I get DOS-style line endings.
  • But when I run npm install on Windows, then I get Unix line endings again.

I'm not exactly sure what is happening here. I'll try recommitting the file and see if that makes any difference.


In the meantime, as a workaround, you can fix index.js yourself, or use the web demo for the time being.

@edo9k
Copy link
Author

edo9k commented Nov 8, 2017

On the line ending problem, I tried using sed to correct the problem, and got into some file ownership problem.
But I have been using the web demo, and it's working perfectly.
Thanks again.

@epsil
Copy link
Owner

epsil commented Nov 8, 2017

Try:

sudo vi index.js

Then, in vi:

:set ff=unix
:wq!

@edo9k
Copy link
Author

edo9k commented Nov 8, 2017

Worked! Thanks a lot!

@epsil
Copy link
Owner

epsil commented Nov 8, 2017

On a related note, I will also commit a fix to make the output parameter optional, so that

spotgen hardcore_softpop.txt

works just as well as

spotgen hardcore_softpop.txt output.txt

As of currently, the latter works, the former does not.

@epsil
Copy link
Owner

epsil commented Nov 8, 2017

Hi!

Would you please update spotgen to the latest version and check if it works?

sudo npm uninstall -g spotgen
sudo npm install -g spotgen

@edo9k
Copy link
Author

edo9k commented Nov 8, 2017

Working like a charm! Thanks a lot, man 👍

@epsil epsil closed this as completed Nov 9, 2017
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