Skip to content

Commit

Permalink
Show message if empty env
Browse files Browse the repository at this point in the history
Fixes #990
  • Loading branch information
mxcl committed Sep 10, 2024
1 parent c522560 commit a539c8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ export default async function({ flags, ...opts }: Args, logger_prefix?: string)
await ensure_pantry()
const { update, pkgs: xopts } = await parse_xopts(opts.pkgs, flags.update)
const pkgs = consolidate(xopts)
console.log(await env({pkgs, update, logger}))
const out = await env({pkgs, update, logger})
if (out.trim()) {
console.log(out)
} else {
console.error("empty env, try `pkgx --help`")
}
} break
case 'version':
console.log(`pkgx ${version()}`)
Expand Down

0 comments on commit a539c8c

Please sign in to comment.