Skip to content

Commit

Permalink
chore: use config from codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Oct 14, 2024
1 parent 117872d commit 1d12330
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as vscode from "vscode";

import { displayName } from "./generated/meta";
import type { HurlExecutionOptions } from "./hurl-entry";
import { config } from "./config";

export const logger = useLogger(displayName);
export const responseLogger = useLogger(`${displayName} Response`);
Expand All @@ -28,8 +29,7 @@ export async function executeHurl(
const { filePath, envFile, variables, fromEntry, toEntry } = options;

// Get the verbosity configuration
const config = vscode.workspace.getConfiguration("vscode-hurl-runner");
const verboseMode = config.get<string>("verboseMode", "verbose");
const verboseMode = config.verboseMode;
const isVeryVerbose = verboseMode === "very-verbose";
const verboseFlag = isVeryVerbose ? "--very-verbose" : "--verbose";
const args = [filePath, verboseFlag];
Expand Down Expand Up @@ -101,8 +101,7 @@ export async function executeHurlWithContent(
const { content, envFile, variables } = options;

// Get the verbosity configuration
const config = vscode.workspace.getConfiguration("vscode-hurl-runner");
const verboseMode = config.get<string>("verboseMode", "verbose");
const verboseMode = config.verboseMode;
const isVeryVerbose = verboseMode === "very-verbose";
const verboseFlag = isVeryVerbose ? "--very-verbose" : "--verbose";

Expand Down

0 comments on commit 1d12330

Please sign in to comment.