Skip to content

Commit

Permalink
Merge pull request #3 from dylansmith/b/trap-search-cancel-error
Browse files Browse the repository at this point in the history
fixed console stacktrace if you use ctrl-c to quit search results
  • Loading branch information
ersel committed Jan 31, 2017
2 parents 9f4d92e + f23be66 commit fbd8f9c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ jspm_packages

# Optional REPL history
.node_repl_history

# yarn
yarn.lock
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ program
printer.printSearchResults(resultType, results);
prompt.start();
prompt.get(['selection'], function (err, result) {
if (err) {
return process.stdout.write('\n');
}
if(results[result.selection-1]){
var selectedSpotifyURI = results[result.selection-1].spotifyURI;
spotifyClient.play(selectedSpotifyURI).then(() => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"chalk": "^1.1.3",
"commander": "^2.9.0",
"lodash": "^4.17.4",
"lyricist-dev": "https://github.com/ersel/lyricist.git",
"lyricist": "https://github.com/ersel/lyricist.git",
"moment": "^2.17.1",
"moment-duration-format": "^1.3.0",
"nconf": "^0.8.4",
Expand Down

0 comments on commit fbd8f9c

Please sign in to comment.