mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
e44c538f37
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> |
||
---|---|---|
.. | ||
args | ||
bench | ||
cache | ||
js | ||
lsp | ||
napi | ||
npm | ||
ops | ||
schemas | ||
standalone | ||
tools | ||
tsc | ||
util | ||
auth_tokens.rs | ||
build.rs | ||
Cargo.toml | ||
cdp.rs | ||
deno.ico | ||
emit.rs | ||
entitlements.plist | ||
errors.rs | ||
factory.rs | ||
file_fetcher.rs | ||
graph_container.rs | ||
graph_util.rs | ||
http_util.rs | ||
integration_tests_runner.rs | ||
js.rs | ||
jsr.rs | ||
main.rs | ||
mainrt.rs | ||
module_loader.rs | ||
node.rs | ||
README.md | ||
resolver.rs | ||
version.rs | ||
worker.rs |