Skip to content

Commit

Permalink
fix: codeflare dashboard -1 was not working
Browse files Browse the repository at this point in the history
  • Loading branch information
starpit committed Apr 1, 2023
1 parent cd17bbb commit c8e33c9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ export default async function dashboard(args: Arguments<Options>, cmd: "db" | "d
const { demo } = args.parsedOptions
const scale = args.parsedOptions.s || 1

const kind = args.argvNoOptions[args.argvNoOptions.indexOf(cmd) + 1] || "all"
const { jobId, profile } = await jobIdFrom(args, cmd)
const jobIdOffset = args.argvNoOptions[args.argvNoOptions.indexOf(cmd) + 2] ? 2 : 1
const kindOffset = jobIdOffset === 2 ? 1 : 9999
const kind = args.argvNoOptions[args.argvNoOptions.indexOf(cmd) + kindOffset] || "all"
const { jobId, profile } = await jobIdFrom(args, cmd, jobIdOffset)

if (!isValidKindA(kind)) {
throw new Error(usage(cmd, ["all"]))
Expand Down

0 comments on commit c8e33c9

Please sign in to comment.