mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
parent
2027d98a8e
commit
0204071e30
4 changed files with 20 additions and 1 deletions
|
@ -524,8 +524,9 @@ impl ConfigFile {
|
|||
if checked.insert(ancestor.to_path_buf()) {
|
||||
for config_filename in CONFIG_FILE_NAMES {
|
||||
let f = ancestor.join(config_filename);
|
||||
match ConfigFile::read(f) {
|
||||
match ConfigFile::read(&f) {
|
||||
Ok(cf) => {
|
||||
log::debug!("Config file found at '{}'", f.display());
|
||||
return Ok(Some(cf));
|
||||
}
|
||||
Err(e) => {
|
||||
|
|
|
@ -2601,6 +2601,11 @@ itest!(config_auto_discovered_for_local_script {
|
|||
output_str: Some("ok\n"),
|
||||
});
|
||||
|
||||
itest!(config_auto_discovered_for_local_script_log {
|
||||
args: "run -L debug run/with_config/frontend_work.ts",
|
||||
output: "run/with_config/auto_discovery_log.out",
|
||||
});
|
||||
|
||||
itest!(no_config_auto_discovery_for_local_script {
|
||||
args: "run --quiet --no-config --check run/with_config/frontend_work.ts",
|
||||
output: "run/with_config/no_auto_discovery.out",
|
||||
|
|
2
cli/tests/testdata/fmt/fmt_with_config_default.out
vendored
Normal file
2
cli/tests/testdata/fmt/fmt_with_config_default.out
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
Config file found at '[WILDCARD]deno.jsonc'
|
||||
Checked 2 files
|
11
cli/tests/testdata/run/with_config/auto_discovery_log.out
vendored
Normal file
11
cli/tests/testdata/run/with_config/auto_discovery_log.out
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
DEBUG RS - deno::args::config_file:529 - Config file found at '[WILDCARD]deno.jsonc'
|
||||
DEBUG RS - deno::js:33 - Deno isolate init with snapshots.
|
||||
DEBUG JS - args []
|
||||
DEBUG RS - deno::worker:66 - main_module [WILDCARD]
|
||||
DEBUG RS - deno::proc_state:327 - Preparing module load.
|
||||
DEBUG RS - deno::cache::parsed_source:156 - Loading cached module analyzer.
|
||||
DEBUG RS - deno::proc_state:406 - Creating module graph.
|
||||
DEBUG RS - deno::file_fetcher:551 - FileFetcher::fetch() - specifier: [WILDCARD]
|
||||
DEBUG RS - deno_runtime::permissions:55 - ⚠️️ Granted read access to "[WILDCARD]"
|
||||
DEBUG RS - deno::proc_state:498 - Prepared module load.
|
||||
ok
|
Loading…
Reference in a new issue