Skip to content

Commit

Permalink
check version
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna committed Jul 17, 2024
1 parent 77a713e commit b29e1c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/subcommands/logs_test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { parseArgsForLogSubcommand } from "./logs.ts";
import { assertEquals, assertThrows } from "jsr:@std/[email protected]";
import { parseArgs } from "../args.ts";
import { greaterOrEqual, parse } from "jsr:@std/[email protected]";

Deno.test("parseArgsForLogSubcommand", async (t) => {
const parseHelper = (args: string[]) => {
Expand All @@ -15,7 +16,11 @@ Deno.test("parseArgsForLogSubcommand", async (t) => {
// to fail unexpectedly (not sure if this is intended). To avoid this, we
// set `Deno.exitCode` to 0 before giving control back to each test case.
// https://github.com/denoland/deno/pull/23609
Deno.exitCode = 0;
const EXIT_CODE_MIN_VERSION = parse("1.44.0");
const currentVersion = parse(Deno.version.deno);
if (greaterOrEqual(currentVersion, EXIT_CODE_MIN_VERSION)) {
Deno.exitCode = 0;
}
throw e;
}
};
Expand Down

0 comments on commit b29e1c4

Please sign in to comment.