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

Doesn't work when working dir == C:\ #1

Closed
ComFreek opened this issue Dec 30, 2014 · 5 comments
Closed

Doesn't work when working dir == C:\ #1

ComFreek opened this issue Dec 30, 2014 · 5 comments

Comments

@ComFreek
Copy link
Contributor

  1. It doesn't work if the current working directory is C:\ (my system drive).

    C:\>sunset
    
    C:\Users\ComFreek\AppData\Roaming\npm\node_modules\cli-sunset\sunset:54
                    text: sun.replace(/\u001b\[0m/g, "").trimRight() + "\n\n\n
                              ^
    TypeError: Cannot call method 'replace' of undefined
    at C:\Users\ComFreek\AppData\Roaming\npm\node_modules\cli-sunset\sunset:54:31
    at C:\Users\ComFreek\AppData\Roaming\npm\node_modules\cli-sunset\node_modules\f
    iglet\lib\figlet.js:732:13
    at C:\Users\ComFreek\AppData\Roaming\npm\node_modules\cli-sunset\node_modules\f
    iglet\lib\node-figlet.js:25:9
    at fs.js:271:14
    at Object.oncomplete (fs.js:107:15)
    
    C:\>
    
  2. The bad news: it doesn't work in cmd.exe
    Screenshot of cmd.exe failing

  3. The good news: it works like a charm in PowerShell 😄 The only issue is the space at the bottom which is slightly too big:
    Space at the bottom is too big

@IonicaBizau
Copy link
Owner

The only issue is the space at the bottom which is slightly too big

That's the intended behavior. 😄

@IonicaBizau
Copy link
Owner

@ComFreek
Copy link
Contributor Author

The error only appears when the working directory is unwritable. The error vanishes when one uses admin privileges to open cmd/PowerShell. I will dig further.

@ComFreek
Copy link
Contributor Author

We should write the temp file into temp directory: https://github.com/IonicaBizau/image-to-ascii/blob/master/lib/index.js#L95 Will fix that

@IonicaBizau
Copy link
Owner

Can you update the image-to-ascii version here?

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