Skip to content

Commit

Permalink
fix: bug with telemetry:add (#3094)
Browse files Browse the repository at this point in the history
* Accept app as a string so we don't assume heroku remote

* Remove remote as a flag

* Fix test
  • Loading branch information
eablack authored Nov 14, 2024
1 parent 60b509d commit df31ab2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/cli/src/commands/telemetry/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export default class Add extends Command {
static description = 'Add and configure a new telemetry drain. Defaults to collecting all telemetry unless otherwise specified.'

static flags = {
app: Flags.app({exactlyOne: ['app', 'remote', 'space'], description: 'app to add a drain to'}),
remote: Flags.remote({description: 'git remote of app to add a drain to'}),
app: Flags.string({char: 'a', exactlyOne: ['app', 'space'], description: 'app to add a drain to'}),
space: Flags.string({char: 's', description: 'space to add a drain to'}),
signals: Flags.string({default: 'all', description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.'}),
endpoint: Flags.string({required: true, description: 'drain url'}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/unit/commands/telemetry/add.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('telemetry:add', function () {
])
} catch (error) {
const {message} = error as { message: string }
expect(message).to.contain('Exactly one of the following must be provided: --app, --remote, --space')
expect(message).to.contain('Exactly one of the following must be provided: --app, --space')
}
})

Expand Down

0 comments on commit df31ab2

Please sign in to comment.