Skip to content

Commit

Permalink
fix: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Jan 19, 2023
1 parent 0be1c62 commit c47ab29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ const defaultFlagToCached = async (flag: CompletableOptionFlag<any>) => {
}
}

const defaultArgToCached = async (arg: Arg<any>) => {
const defaultArgToCached = async (arg: Arg<any>): Promise<any> => {
// Prefer the helpDefaultValue function (returns a friendly string for complex types)
if (typeof arg.defaultHelp === 'function') {
try {
Expand Down
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ export const fileExists = async (input: string): Promise<string> => {
}

export function isTruthy(input: string): boolean {
return ['true', 'TRUE', '1', 'yes', 'YES', 'y', 'Y'].includes(input)
return ['true', '1', 'yes', 'y'].includes(input.toLowerCase())
}

export function isNotFalsy(input: string): boolean {
return !['false', 'FALSE', '0', 'no', 'NO', 'n', 'N'].includes(input)
return !['false', '0', 'no', 'n'].includes(input.toLowerCase())
}

export function requireJson<T>(...pathParts: string[]): T {
Expand Down

0 comments on commit c47ab29

Please sign in to comment.