Skip to content

Commit

Permalink
fix(deploy): make watch parameter implicit when hot-reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald authored and thsig committed Feb 8, 2019
1 parent 2d025b7 commit 0819605
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions garden-service/src/commands/deploy.ts
Original file line number Diff line number Diff line change
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 0819605

Please sign in to comment.