Skip to content

Commit

Permalink
Activate dependencies on clean action
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Oct 29, 2019
1 parent 700372b commit ca71155
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/env/lib/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ module.exports = {

async clean( { environment, spinner } ) {
const context = await detectContext();
const dependencies = await resolveDependencies();
const activateDependencies = () => Promise.all( dependencies.map( activateContext ) );

const description = `${ environment } environment${
environment === 'all' ? 's' : ''
Expand All @@ -158,6 +160,7 @@ module.exports = {
resetDatabase()
.then( setupSite )
.then( activateContext.bind( null, context ) )
.then( activateDependencies )
.catch( () => {} )
);
}
Expand All @@ -166,6 +169,7 @@ module.exports = {
resetDatabase( true )
.then( setupSite.bind( null, true ) )
.then( activateContext.bind( null, context, true ) )
.then( activateDependencies )

This comment has been minimized.

Copy link
@epiqueras

epiqueras Oct 29, 2019

Contributor

We shouldn't reactivate dependencies when the test environment is cleaned.

.catch( () => {} )
);
}
Expand Down

0 comments on commit ca71155

Please sign in to comment.