Skip to content

Commit 9b5b81f

Browse files
committed
add allowed values enum
1 parent 345ab98 commit 9b5b81f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

script/check-internal-links.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const linkinator = require('linkinator')
44
const checker = new linkinator.LinkChecker()
55
const { deprecated, latest } = require('../lib/enterprise-server-releases')
66
const englishRoot = 'http://localhost:4002/en'
7+
const allowedVersions = ['dotcom', 'enterprise-server', 'github-ae']
78

89
// [start-readme]
910
//
@@ -53,7 +54,7 @@ if (process.env.VERSION === 'dotcom') {
5354
main()
5455

5556
async function main () {
56-
process.env.VERSION
57+
process.env.VERSION && allowedVersions.includes(process.env.VERSION)
5758
? console.log(`Checking internal links for version ${process.env.VERSION}!\n`)
5859
: console.log('Checking internal links for all versions!\n')
5960

0 commit comments

Comments
 (0)