fix(cli): use a(n) article in difyctl prerelease warning (#37976)

This commit is contained in:
Xiyuan Chen 2026-06-25 17:49:42 -07:00 committed by GitHub
parent 2e9c0a3c7a
commit 2047e0dc12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -158,6 +158,6 @@ describe('Version command', () => {
if (output?.kind !== 'formatted')
throw new Error('expected formatted output')
expect(output.data.text()).toContain('WARNING: This build is a rc release')
expect(output.data.text()).toContain('WARNING: This build is a(n) rc release')
})
})

View File

@ -60,7 +60,7 @@ describe('renderVersionText', () => {
}
const text = renderVersionText(report)
expect(text).toContain('WARNING: This build is a rc release')
expect(text).toContain('WARNING: This build is a(n) rc release')
expect(text).toContain('install or wait for the stable channel')
})
@ -72,7 +72,7 @@ describe('renderVersionText', () => {
}
const text = renderVersionText(report)
expect(text).toContain('WARNING: This build is a alpha release')
expect(text).toContain('WARNING: This build is a(n) alpha release')
expect(text).toContain('install or wait for the stable channel')
})
@ -84,7 +84,7 @@ describe('renderVersionText', () => {
}
const text = renderVersionText(report)
expect(text).toContain('WARNING: This build is a edge release')
expect(text).toContain('WARNING: This build is a(n) edge release')
expect(text).toContain('install or wait for the stable channel')
})
@ -140,7 +140,7 @@ describe('renderVersionText', () => {
// RC warning) ran, yet the output is byte-clean.
expect(plain).not.toMatch(ANSI_RE)
expect(plain).toContain('Compatibility: incompatible')
expect(plain).toContain('WARNING: This build is a rc release')
expect(plain).toContain('WARNING: This build is a(n) rc release')
})
describe('with picocolors stubbed to always emit ANSI', () => {
@ -183,7 +183,7 @@ describe('renderVersionText', () => {
expect(colored).toMatch(ANSI_RE)
expect(colored).toContain('Compatibility: incompatible')
// prerelease warning lines also routed through yellow.
expect(colored).toContain('WARNING: This build is a rc release')
expect(colored).toContain('WARNING: This build is a(n) rc release')
})
})

View File

@ -4,7 +4,7 @@ import { colorScheme } from '@/sys/io/color'
function prereleaseWarning(channel: Channel): readonly string[] {
return [
`WARNING: This build is a ${channel} release. It is not stable`,
`WARNING: This build is a(n) ${channel} release. It is not stable`,
' and may have bugs. For production use, install or wait for the stable channel.',
]
}