Skip to content

Commit c4558c9

Browse files
authored
Output where preference is saved (#31305)
Fixes #31241 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
1 parent fbe366f commit c4558c9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/next/cli/next-telemetry.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ const nextTelemetry: cliCommand = (argv) => {
5353

5454
isEnabled = true
5555
} else if (args['--disable'] || args._[0] === 'disable') {
56-
telemetry.setEnabled(false)
56+
const path = telemetry.setEnabled(false)
5757
if (isEnabled) {
58-
console.log(chalk.cyan('Your preference has been saved.'))
58+
console.log(
59+
chalk.cyan(
60+
`Your preference has been saved${path ? ` to ${path}` : ''}.`
61+
)
62+
)
5963
} else {
6064
console.log(
6165
chalk.yellow(`Next.js' telemetry collection is already disabled.`)

packages/next/telemetry/storage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export class Telemetry {
138138
setEnabled = (_enabled: boolean) => {
139139
const enabled = !!_enabled
140140
this.conf && this.conf.set(TELEMETRY_KEY_ENABLED, enabled)
141+
return this.conf && this.conf.path
141142
}
142143

143144
get isEnabled(): boolean {

0 commit comments

Comments
 (0)