File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,15 @@ module.exports = class SkeletonApp {
1313 }
1414
1515 build ( ) {
16- return execa ( 'ember' , [ 'build' ] , { cwd : this . appDir } ) ;
16+ return this . _ember ( [ 'build' ] ) ;
1717 }
1818
1919 serve ( ) {
2020 if ( this . _watched ) {
2121 throw new Error ( 'Already serving' ) ;
2222 }
2323
24- let ember = execa ( 'ember' , [ 'serve' ] , { cwd : this . appDir } ) ;
25- return this . _watched = new WatchedBuild ( ember ) ;
24+ return this . _watched = new WatchedBuild ( this . _ember ( [ 'serve' ] ) ) ;
2625 }
2726
2827 writeFile ( path , contents ) {
@@ -42,9 +41,14 @@ module.exports = class SkeletonApp {
4241 fs . removeSync ( this . appDir ) ;
4342 } catch ( error ) {
4443 // eslint-disable-next-line no-console
45- console . warn ( `Error removing skeleton-app tmpdir ${ this . appDir } ` , error ) ;
44+ console . warn ( `Warning: unable to remove skeleton-app tmpdir ${ this . appDir } ( ${ error . code } )` ) ;
4645 }
4746 }
47+
48+ _ember ( args ) {
49+ let ember = require . resolve ( 'ember-cli/bin/ember' ) ;
50+ return execa ( 'node' , [ ember ] . concat ( args ) , { cwd : this . appDir } ) ;
51+ }
4852}
4953
5054class WatchedBuild extends EventEmitter {
You can’t perform that action at this time.
0 commit comments