mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 07:01:16 +00:00
bundle/run handles Deno.args better. (denoland/deno_std#514)
Original: 02262c6161
This commit is contained in:
parent
684805919a
commit
a02c3bd388
2 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
import { assertStrictEq, assert } from "../testing/asserts.ts";
|
||||
import { assert } from "../testing/asserts.ts";
|
||||
import { exists } from "../fs/exists.ts";
|
||||
|
||||
export interface DefineFactory {
|
||||
|
@ -98,7 +98,7 @@ export function instantiate(
|
|||
/** Load the bundle and return the contents asynchronously. */
|
||||
export async function load(args: string[]): Promise<string> {
|
||||
// TODO(kitsonk) allow loading of remote bundles via fetch.
|
||||
assertStrictEq(args.length, 2, "Expected exactly two arguments.");
|
||||
assert(args.length >= 2, "Expected at least two arguments.");
|
||||
const [, bundleFileName] = args;
|
||||
assert(
|
||||
await exists(bundleFileName),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue