Skip to content

Commit

Permalink
feat(service): disable maintenance for build command
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Dec 27, 2019
1 parent 16a89f6 commit bb61374
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/@nodepack/service/src/lib/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ const { loadModule } = require('@nodepack/module')
const { runMaintenance } = require('@nodepack/maintenance')
const { defaultOptions } = require('./options')

const NO_MAINTENANCE_COMMANDS = [
'help',
'build',
]

module.exports = class Service {
/**
* @param {string} cwd
Expand Down Expand Up @@ -288,7 +293,7 @@ module.exports = class Service {
this.commandName = name
this.command = command

const maintenanceEnabled = name !== 'help' &&
const maintenanceEnabled = !NO_MAINTENANCE_COMMANDS.includes(name) &&
process.env.NODEPACK_NO_MAINTENANCE !== 'true' &&
args.maintenance !== false
if (maintenanceEnabled) {
Expand Down

0 comments on commit bb61374

Please sign in to comment.