Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Fixed #137 - REPL was not working if Atom Ink wasn't installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongilman committed Aug 11, 2016
1 parent 04e4bc6 commit 08a9145
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,7 @@ Accidentally published as major instead of minor but oh well! Now is as good a t
* Updating REPL instructions.
* Fixing sizing of result output.
* Fixing REPL history.

# 1.4.2

* Fixed #137 - REPL was not working if Atom Ink wasn't installed.
3 changes: 1 addition & 2 deletions lib/proto-repl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ module.exports = ProtoRepl =
@repl.startProcessIfNotRunning(projectPath)

prepareRepl: (repl)->
if @ink
repl.consumeInk(@ink)
repl.consumeInk(@ink)
repl.onDidClose =>
@repl = null
repl.onDidStart =>
Expand Down
6 changes: 5 additions & 1 deletion lib/repl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Repl
consumeInk: (ink)->
@ink = ink

if atom.config.get("proto-repl.inkConsole")
if @ink && atom.config.get("proto-repl.inkConsole")
@replView = new InkConsole(@ink)
else
@replView = new ReplTextEditor()
Expand All @@ -54,6 +54,10 @@ class Repl
# Display the help text when the repl opens.
if atom.config.get("proto-repl.displayHelpText")
@info(replHelpText)
# Warn if Atom Ink is not installed.
if !@ink && atom.config.get("proto-repl.inkConsole")
@info("Atom Ink does not appear to be installed. Install it to get a better REPL experience.")


# The window was closed
@replView.onDidClose =>
Expand Down

0 comments on commit 08a9145

Please sign in to comment.