Skip to content

Commit

Permalink
fix(sanity): use --no-dry instead of --dry=false
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Jan 30, 2024
1 parent cc6b2f3 commit ba905dc
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {formatMutation} from './utils/mutationFormatter'

const helpText = `
Options
--dry <boolean> Whether or not to dry run the migration. Default to true, to actually run the migration this has to be set to false
--dry <boolean> Whether or not to dry run the migration. Default to true, to actually run the migration, pass --no-dry
--from-export <export.tar.gz> Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.
--concurrency <concurrent> How many mutation requests to run in parallel. Must be between 1 and ${MAX_MUTATION_CONCURRENCY}. Default: ${DEFAULT_MUTATION_CONCURRENCY}.
--no-progress Don't output progress. Useful if you want debug your migration script and see the output of console.log() statements.
Expand All @@ -30,7 +30,7 @@ Examples
`

interface CreateFlags {
dry?: 'true' | 'false' | 'yes' | 'no'
dry?: boolean
'from-export'?: string
concurrency?: number
progress?: boolean
Expand Down Expand Up @@ -64,10 +64,11 @@ const createMigrationCommand: CliCommandDefinition<CreateFlags> = {
action: async (args, context) => {
const {apiClient, output, prompt, chalk, workDir} = context
const [migrationName] = args.argsWithoutOptions

const [fromExport, dry, showProgress] = [
args.extOptions['from-export'],
args.extOptions.dry !== 'false',
args.extOptions.progress,
args.extOptions.dry !== false,
args.extOptions.progress !== false,
]

if (!migrationName) {
Expand Down

0 comments on commit ba905dc

Please sign in to comment.