Permalink
Browse files

If prompt.message is disabled, don't show extra delimiter at the begi…

…nning of the line
  • Loading branch information...
1 parent 5db5fae commit 6b91caf4ae599655923c985b08466a6655455387 @Olegas committed Nov 2, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/prompt.js
View
@@ -413,8 +413,11 @@ prompt.getInput = function (prop, callback) {
defaultLine = schema.default;
name = prop.description || schema.description || propName;
raw = prompt.colors
- ? [prompt.message, delim + name.grey, delim.grey]
- : [prompt.message, delim + name, delim];
+ ? [name.grey, delim.grey]
+ : [name, delim];
+
+ if (prompt.message)
+ raw.unshift(prompt.message, delim);
prop = {
schema: schema,

0 comments on commit 6b91caf

Please sign in to comment.