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

Add null check to avoid breaking when there is no tty #18

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

rogeriochaves
Copy link
Contributor

I'm getting this error when running a code that uses ascii-progress inside docker with no tty attached:

node_modules/ascii-progress/index.js:459
  this.cursor.moveTo(this.savePos.row, this.savePos.col);
                                 ^

TypeError: Cannot read property 'row' of undefined

I believe the issue is that get-cursor-position returns null when you don't have a tty, so I've added a null check in this line.

Probably same reason of #14

@bubkoo bubkoo merged commit 580c57a into bubkoo:master Jun 21, 2017
@rogeriochaves
Copy link
Contributor Author

can you publish a new version?

@bubkoo
Copy link
Owner

bubkoo commented Jun 27, 2017

@rogeriochaves v1.0.6

@Javarome
Copy link

Javarome commented Jul 22, 2018

Looks like 1.0.6 is not available

npm install
npm ERR! Darwin 17.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "install" "--scripts-prepend-node-path=auto"
npm ERR! node v7.6.0
npm ERR! npm  v4.2.0
npm ERR! code ETARGET

npm ERR! notarget No compatible version found: ascii-progress@^1.0.6
npm ERR! notarget Valid install targets:
npm ERR! notarget 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5

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

Successfully merging this pull request may close these issues.

3 participants