Skip to content

Commit

Permalink
Merge pull request #524 from garden-io/fix-deploy-watch-flag
Browse files Browse the repository at this point in the history
fix(deploy): make watch parameter implicit when hot-reloading
  • Loading branch information
thsig committed Feb 8, 2019
2 parents 2d025b7 + 0819605 commit 84f1d8a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions garden-service/src/commands/deploy.ts
Expand Up @@ -23,7 +23,6 @@ import { processServices } from "../process"
import { logHeader } from "../logger/util"
import { HotReloadTask } from "../tasks/hot-reload"
import { BaseTask } from "../tasks/base"
import { ParameterError } from "../exceptions"

const deployArgs = {
services: new StringsParameter({
Expand Down Expand Up @@ -90,12 +89,8 @@ export class DeployCommand extends Command<Args, Opts> {
return { result: {} }
}

const watch = opts.watch
const hotReloadServiceNames = opts["hot-reload"] || []

if (hotReloadServiceNames.length > 0 && !watch) {
throw new ParameterError(`Must specify --watch flag when requesting hot-reloading`, { opts })
}
const watch = opts.watch || hotReloadServiceNames.length > 0

// TODO: make this a task
await garden.actions.prepareEnvironment({ log })
Expand Down

0 comments on commit 84f1d8a

Please sign in to comment.