Skip to content

Commit

Permalink
improvement(sync): deprecate non-interactive sync stop command
Browse files Browse the repository at this point in the history
Recommend to run it from inside dev console.
  • Loading branch information
vvagaytsev committed Feb 19, 2024
1 parent a8d9c6a commit c128d11
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/commands/sync/sync-stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { dedent, naturalList } from "../../util/string.js"
import type { CommandParams, CommandResult } from "../base.js"
import { Command } from "../base.js"
import { createActionLog } from "../../logger/log-entry.js"
import { styles } from "../../logger/styles.js"

const syncStopArgs = {
names: new StringsParameter({
Expand Down Expand Up @@ -60,6 +61,15 @@ export class SyncStopCommand extends Command<Args, Opts> {
async action(params: CommandParams<Args, Opts>): Promise<CommandResult<{}>> {
const { garden, log, args } = params

if (!params.parentCommand) {
log.warn(
dedent`Behaviour of ${styles.command(
"sync stop"
)} is now deprecated and will be changed in a future breaking change release.
Instead we recommend running it ${styles.italic("inside")} the dev console.`
)
}

// We default to stopping all syncs.
const names = args.names || ["*"]

Expand Down

0 comments on commit c128d11

Please sign in to comment.