From 81e941bc92aac37bbf2f385eeceec9e4c8cfb13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 3 Sep 2024 16:55:29 +0100 Subject: fix(install): recommend using `deno install -g` when using a single http url (#25388) Closes https://github.com/denoland/deno/issues/25361 --- .../__test__.jsonc | 14 ++++++++++++++ .../install_http.out | 2 ++ .../install_https.out | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 tests/specs/install/install_single_http_url_without_global_flag/__test__.jsonc create mode 100644 tests/specs/install/install_single_http_url_without_global_flag/install_http.out create mode 100644 tests/specs/install/install_single_http_url_without_global_flag/install_https.out (limited to 'tests') diff --git a/tests/specs/install/install_single_http_url_without_global_flag/__test__.jsonc b/tests/specs/install/install_single_http_url_without_global_flag/__test__.jsonc new file mode 100644 index 000000000..b906a846d --- /dev/null +++ b/tests/specs/install/install_single_http_url_without_global_flag/__test__.jsonc @@ -0,0 +1,14 @@ +{ + "steps": [ + { + "args": "install http://example.com", + "output": "install_http.out", + "exitCode": 1 + }, + { + "args": "install https://example.com", + "output": "install_https.out", + "exitCode": 1 + } + ] +} diff --git a/tests/specs/install/install_single_http_url_without_global_flag/install_http.out b/tests/specs/install/install_single_http_url_without_global_flag/install_http.out new file mode 100644 index 000000000..17f4b286d --- /dev/null +++ b/tests/specs/install/install_single_http_url_without_global_flag/install_http.out @@ -0,0 +1,2 @@ +error: Failed to install "http" specifier. If you are trying to install http://example.com/ globally, run again with `-g` flag: + deno install -g http://example.com/ diff --git a/tests/specs/install/install_single_http_url_without_global_flag/install_https.out b/tests/specs/install/install_single_http_url_without_global_flag/install_https.out new file mode 100644 index 000000000..87597de12 --- /dev/null +++ b/tests/specs/install/install_single_http_url_without_global_flag/install_https.out @@ -0,0 +1,2 @@ +error: Failed to install "https" specifier. If you are trying to install https://example.com/ globally, run again with `-g` flag: + deno install -g https://example.com/ -- cgit v1.2.3