Skip to content

Commit

Permalink
fix(commands): remove default value for yargs environment-id options
Browse files Browse the repository at this point in the history
Removes static default set within yargs environment-id option to prevent the active environment from being overriden.
  • Loading branch information
timswalling authored and Johann committed Jul 16, 2019
1 parent bc2957a commit a909542
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/cmds/content-type_cmds/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const builder = (yargs) => {
.option('id', { type: 'string', demand: true, describe: 'Content Type id' })
.option('space-id', { alias: 's', type: 'string', describe: 'Space id' })
.option('management-token', { alias: 'mt', type: 'string', describe: 'Contentful management API token' })
.option('environment-id', { type: 'string', describe: 'Environment id', default: 'master' })
.option('environment-id', { type: 'string', describe: 'Environment id' })
.epilog('Copyright 2018 Contentful, this is a BETA release')
}

Expand Down
3 changes: 1 addition & 2 deletions lib/cmds/space_cmds/generate_cmds/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ export const builder = (yargs) => {
type: 'string'
})
.option('environment-id', {
describe: 'ID of the environment the content model will belong to. If not provided, defaults to master',
describe: 'ID of the environment the content model will belong to',
alias: 'e',
default: 'master',
type: 'string'
})
.option('content-type-id', {
Expand Down
1 change: 0 additions & 1 deletion lib/cmds/space_cmds/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const builder = (yargs) => {
.option('environment-id', {
describe: 'ID the environment in the destination space',
type: 'string',
default: 'master',
demand: false
})
.option('management-token', {
Expand Down
1 change: 0 additions & 1 deletion lib/cmds/space_cmds/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const builder = (yargs) => {
.option('environment-id', {
alias: 'e',
describe: 'ID of the environment within the space to run the migration script on',
default: 'master'
})
.option('management-token', {
alias: 'mt',
Expand Down

0 comments on commit a909542

Please sign in to comment.