summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-09-12 12:56:53 -0400
committerGitHub <noreply@github.com>2019-09-12 12:56:53 -0400
commit93d6faacf59f962eb0cc48e10eb42cfd85bfc98b (patch)
tree7c345115134f196395845f87f606535a73710993
parentc7db26cfec07cafb7b45770499a18359481956a5 (diff)
Keep all deno_std URLs in sync (#2930)
-rw-r--r--cli/flags.rs20
1 files changed, 13 insertions, 7 deletions
diff --git a/cli/flags.rs b/cli/flags.rs
index 7e129b6ab..2811c2c20 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -12,6 +12,19 @@ use std;
use std::str;
use std::str::FromStr;
+macro_rules! std_url {
+ ($x:expr) => {
+ concat!("https://deno.land/std@06958a4/", $x)
+ };
+}
+
+/// Used for `deno fmt <files>...` subcommand
+const PRETTIER_URL: &str = std_url!("prettier/main.ts");
+/// Used for `deno install...` subcommand
+const INSTALLER_URL: &str = std_url!("installer/mod.ts");
+/// Used for `deno test...` subcommand
+const TEST_RUNNER_URL: &str = std_url!("testing/runner.ts");
+
// Creates vector of strings, Vec<String>
macro_rules! svec {
($($x:expr),*) => (vec![$($x.to_string()),*]);
@@ -677,13 +690,6 @@ fn parse_script_args(
(argv, flags)
}
-/// Used for `deno fmt <files>...` subcommand
-const PRETTIER_URL: &str = "https://deno.land/std@06958a4/prettier/main.ts";
-/// Used for `deno install...` subcommand
-const INSTALLER_URL: &str = "https://deno.land/std@v0.11/installer/mod.ts";
-/// Used for `deno test...` subcommand
-const TEST_RUNNER_URL: &str = "https://deno.land/std@4531fa8/testing/runner.ts";
-
/// These are currently handled subcommands.
/// There is no "Help" subcommand because it's handled by `clap::App` itself.
#[derive(Debug, PartialEq)]