Skip to content

Commit

Permalink
chore(build): fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed May 24, 2024
1 parent 4512cf0 commit b86e55f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (cmd && cmd[0] !== '-') {
if (cmd == helpArg) {
cmd = 'default'
} else {
const aliases = {
const aliases: Record<string, string> = {
ls: 'list',
rm: 'remove',
mv: 'move',
Expand Down
2 changes: 1 addition & 1 deletion src/commands/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export default async (cfg: RootConfig) => {
function injectEnv(cmd: string, env: object) {
const envUnixRegex = /\$(\w+)/g
return cmd.replace(envUnixRegex, (_, name) => {
return env[name] || ''
return (env as any)[name] || ''
})
}
2 changes: 1 addition & 1 deletion src/core/printHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function printHelp(cmdPath: string) {
close = opened.length && name == opened[0].name ? '/' : ''
}
if (close) {
const text = k[opened[0].name](
const text = k[opened[0].name as 'red'](
opened[0].text + rawHelp.slice(opened[0].index, match.index)
)
lastIndex = match.index + match[0].length
Expand Down

0 comments on commit b86e55f

Please sign in to comment.