1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
denoland-deno/tests/testdata
Hasan-Alrimawi e44c538f37
fix: --env flag confusing message on syntax error (#23915)
Enhanced warning message for --env flag with run and eval subcommands. 

The commit is specifically made to address issue #23674 by improving the
warning messages that appear when using the --env flag with run or eval
subcommands in the following scenarios:

1. Missing environment file.
2. Incorrect syntax in the environment file content.


**Changes made**

- Distinguishes between cases of missing environment file and wrong
syntax in the environment file content.
- Shows a concise warning message to convey the case/issue occurred.

**Code changes & enhancements**
- Implemented a match statement to handle different types of errors
received while getting and parsing the file content to display a concise
warning message, rather than simple error check and then displaying the
same warning message for whatever the type of error is.
- Updated the related existing tests to reflect the new warning
messages.
- Added two test cases to cover the wrong environment file content
syntax with both run and eval subcommands.

**Impact**
The use of --env flag with both run/eval would be more user-friendly as
it gives a precise description of what is not right when using
incorrectly.

If you could give it a look, @dsherret , I appreciate your feedback on
these changes.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-27 15:06:18 +02:00
..
assets chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
bench chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
benches chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
bundle chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
cache chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
cert chore: move cert itests to spec tests (#23607) 2024-05-03 00:43:12 +00:00
check chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
commonjs chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
compile chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
coverage fix(emit): regression - keep comments in emit (#23815) 2024-05-14 22:01:31 +00:00
doc chore: update deno_doc (#23544) 2024-04-24 20:34:21 +00:00
dynamic_import chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
encoding chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
eval fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
file_extensions chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
fmt feat(ext/fetch): Request.bytes() and Response.bytes() (#23823) 2024-05-23 00:27:58 +00:00
image fix(ext/web): properly handle Blob case for createImageBitmap (#23518) 2024-05-07 04:47:42 -07:00
import_attributes chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
import_maps chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
info chore: rough first pass on spec tests (#22877) 2024-03-13 16:21:13 +00:00
inspector chore: enable clippy::print_stdout and clippy::print_stderr (#23732) 2024-05-08 22:45:06 -04:00
install chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
jsx feat: add jsx precompile skip element option (#23457) 2024-04-22 17:07:36 +02:00
jupyter chore: move more tests away from itest (#22909) 2024-03-15 15:46:51 -04:00
lint chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
lockfile chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
lsp chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
malformed_config chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
module_graph chore: update references to deno_std to use JSR (#23239) 2024-04-10 17:26:35 -04:00
node chore: fix flaky rejection_handled_web_process (#23817) 2024-05-14 23:51:51 +00:00
npm chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
package_json chore: fix flaky net_listen_allow_localhost_4555 (#23726) 2024-05-07 17:21:56 +00:00
publish chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
repl chore: bump deno_core (#22596) 2024-02-27 08:05:57 -07:00
run fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
runtime chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
serve fix: serve handler error with 0 arguments (#23652) 2024-05-17 18:05:19 +05:30
subdir FUTURE: remove import assertions support for JavaScript (#23541) 2024-04-29 22:43:05 +02:00
task chore: Fix failing task_npx_non_existent test (#23945) 2024-05-22 18:57:57 +00:00
test chore: migrate bench, publish, and more itests to spec tests (#23584) 2024-04-29 10:08:27 -04:00
tls fix(ext/tls): add support EC private key (#23261) 2024-04-08 11:36:34 -06:00
tsc chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
tsc2 chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
type_definitions chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
unfurl feat(publish): support sloppy imports and bare node built-ins (#22588) 2024-02-27 15:13:16 +00:00
vendor chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
webcrypto chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
webgpu chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
workers refactor(tests): move worker_threads itests to spec tests (#23648) 2024-05-03 05:52:47 +00:00
allow_run_allowlist_resolution.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
allow_run_allowlist_resolution.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
cat.ts feat(lint): deno lint --fix and lsp quick fixes (#22615) 2024-03-21 14:18:59 -07:00
echo.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
echo_server.ts chore: update std submodule to 0.221.0 (#23112) 2024-04-02 12:57:05 +11:00
env chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
env_unparsable fix: --env flag confusing message on syntax error (#23915) 2024-05-27 15:06:18 +02:00
error_cause_recursive_aggregate.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_aggregate.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_tail.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
error_cause_recursive_tail.ts.out chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
navigator_language.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
navigator_languages.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
spawn_kill_permissions.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
symlink_to_subdir chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00
welcome.ts chore: move cli/tests/ -> tests/ (#22369) 2024-02-10 20:22:13 +00:00