`install` doesn't auto discover config file
It seems deno install currently doesn't auto-discover a deno.json or deno.jsonc config file.
This is suggested in the help entry for deno install -help.
-c, --config <FILE>
The configuration file can be used to configure different aspects of
deno including TypeScript, linting, and code formatting. **Typically
the configuration file will be called `deno.json` or `deno.jsonc`
and automatically detected; in that case this flag is not necessary.**
See
https://deno.land/[email protected]/getting_started/configuration_file
Steps To Reproduce
deno install -n my-module main.ts
Expected Result
#!/bin/sh
# generated by deno install
exec deno run --config /Users/foo/.deno/bin/.my-module.deno.json 'file:///Users/foo/my-module/main.ts' "$@"
Actual Result
#!/bin/sh
# generated by deno install
exec deno run --no-config 'file:///Users/foo/my-module/main.ts' "$@"
This is by design. When running deno install, it's very rare that someone would want it to pull in the config file from the local directory since deno install is a global action rather than a project based one. That said, perhaps it should do this if someone specifies a local file, but I'm not sure that's worth the effort to have different behaviour for considering most people won't be doing that and different behaviour depending on the file specified might create some confusion.
I believe the word "Typically" in the help text means "not always". That help text is shared across many sub commands.
@dsherret Thanks for the clarification.
Maybe the help entry could mention which commands don't support config file auto-discovery?
Currently deno install --help suggest config file auto-discovery
-c, --config <FILE> The configuration file can be used to configure different aspects of deno including TypeScript, linting, and code formatting. Typically the configuration file will be called
deno.jsonordeno.jsoncand automatically detected; in that case this flag is not necessary. See https://deno.land/[email protected]/getting_started/configuration_file
Opened https://github.com/denoland/deno/issues/17855