From 150fdcc478dd2678a8dec8f9cb454afbed7913fb Mon Sep 17 00:00:00 2001 From: lichengyin Date: Wed, 3 Feb 2016 11:36:42 +0800 Subject: [PATCH] fix: fix missing first char on display when create project, fix #258 --- src/command.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/command.js b/src/command.js index d91c4b6d..a20153de 100644 --- a/src/command.js +++ b/src/command.js @@ -597,9 +597,15 @@ let createProject = () => { think.APP_PATH = getProjectAppPath(); _createProject(); + + let p = projectRootPath.slice(cwd.length); + if(p[0] === think.sep){ + p = p.slice(1); + } + console.log(); console.log(' enter path:'); - console.log(' $ cd ' + projectRootPath.slice(cwd.length + 1)); + console.log(' $ cd ' + p); console.log(); console.log(' install dependencies:');