summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-19 15:56:07 -0400
committerGitHub <noreply@github.com>2024-07-19 15:56:07 -0400
commitafcae364beb2cffa8e583b4ffd3a55b59336cb1b (patch)
treef98ba0e5af179b9172f130b63fb35cd77c122932 /cli/tools/fmt.rs
parenta4c76add565b9674ef6880de88013948c61a1ce5 (diff)
refactor: update to deno_config 0.25 (#24645)
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and `WorkspaceDirectory` - Uses the workspace cache in the lsp * https://github.com/denoland/deno_config/pull/95 * https://github.com/denoland/deno_config/pull/96
Diffstat (limited to 'cli/tools/fmt.rs')
-rw-r--r--cli/tools/fmt.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs
index 040991e7c..277a79cda 100644
--- a/cli/tools/fmt.rs
+++ b/cli/tools/fmt.rs
@@ -52,9 +52,9 @@ use crate::cache::IncrementalCache;
pub async fn format(flags: Flags, fmt_flags: FmtFlags) -> Result<(), AnyError> {
if fmt_flags.is_stdin() {
let cli_options = CliOptions::from_flags(flags)?;
- let start_ctx = cli_options.workspace.resolve_start_ctx();
- let fmt_config = start_ctx
- .to_fmt_config(FilePatterns::new_with_base(start_ctx.dir_path()))?;
+ let start_dir = &cli_options.start_dir;
+ let fmt_config = start_dir
+ .to_fmt_config(FilePatterns::new_with_base(start_dir.dir_path()))?;
let fmt_options = FmtOptions::resolve(fmt_config, &fmt_flags);
return format_stdin(
&fmt_flags,