Skip to content

Commit

Permalink
Print 'not known' instead of 'undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nixinova committed Jan 23, 2024
1 parent 84c5fd5 commit f7cfeb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Next
- Changed the CLI result to say 'not known' instead of 'undefined' for versions without associated pack formats.
- Fixed the result of `--latest` not always returning the very latest version.
- Updated resource pack format to `24`.
- Updated data pack format to `26`.
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ else if (args.latest) {
// Print the pack format of a given version
else if (ver) {
if (!args.resource) {
console.log(`Data pack format of ${ver} is ${getPackFormat(ver, 'data')}`)
console.log(`Data pack format of ${ver} is ${getPackFormat(ver, 'data') ?? 'not known'}`)
}
if (!args.data) {
console.log(`Resource pack format of ${ver} is ${getPackFormat(ver, 'resource')}`)
console.log(`Resource pack format of ${ver} is ${getPackFormat(ver, 'resource') ?? 'not known'}`)
}
}

0 comments on commit f7cfeb4

Please sign in to comment.