|
1 | 1 | 'use strict'; |
2 | 2 |
|
3 | | -const RSVP = require('rsvp'); |
4 | | - |
5 | 3 | const lookupCommand = require('./lookup-command'); |
6 | 4 | const getOptionArgs = require('../utilities/get-option-args'); |
7 | 5 | let logger = require('heimdalljs-logger')('ember-cli:cli'); |
8 | 6 | let loggerTesting = require('heimdalljs-logger')('ember-cli:testing'); |
9 | 7 | const heimdall = require('heimdalljs'); |
10 | 8 |
|
11 | | -const Promise = RSVP.Promise; |
12 | 9 | // Disabled until e2e and serve command can be evaluated/corrected -- require('../utilities/will-interrupt-process'); |
13 | 10 | const onProcessInterrupt = { addHandler: (_handler) => { }, removeHandler: (_handler) => { } }; |
14 | 11 |
|
@@ -86,7 +83,7 @@ class CLI { |
86 | 83 | run(environment) { |
87 | 84 | let shutdownOnExit = null; |
88 | 85 |
|
89 | | - return RSVP.hash(environment).then(environment => { |
| 86 | + return Promise.resolve().then(() => { |
90 | 87 | let args = environment.cliArgs.slice(); |
91 | 88 |
|
92 | 89 | if (args.length === 0) { |
@@ -161,11 +158,6 @@ class CLI { |
161 | 158 | onProcessInterrupt.removeHandler(onCommandInterrupt); |
162 | 159 |
|
163 | 160 | return result; |
164 | | - }).finally(() => { |
165 | | - instrumentation.start('shutdown'); |
166 | | - shutdownOnExit = function() { |
167 | | - instrumentation.stopAndReport('shutdown'); |
168 | | - }; |
169 | 161 | }).then(result => { |
170 | 162 | // if the help option was passed, call the help command |
171 | 163 | if (result === 'callHelp') { |
@@ -201,11 +193,6 @@ class CLI { |
201 | 193 |
|
202 | 194 | return runPromise; |
203 | 195 | }) |
204 | | - .finally(() => { |
205 | | - if (shutdownOnExit) { |
206 | | - shutdownOnExit(); |
207 | | - } |
208 | | - }) |
209 | 196 | .catch(this.logError.bind(this)); |
210 | 197 | } |
211 | 198 |
|
|
0 commit comments