Skip to content

Commit

Permalink
honor noEmit options (#5118)
Browse files Browse the repository at this point in the history
* check noEmit options

* invert if
  • Loading branch information
chunyu3 authored Oct 18, 2024
1 parent d8aea23 commit d361584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import { azureSDKContextOptions } from "./sdk-context-options.js";

export async function $onEmit(context: EmitContext<AzureNetEmitterOptions>) {
const program: Program = context.program;

if (program.compilerOptions.noEmit || program.hasError()) return;

const options = resolveAzureEmitterOptions(context);
/* set the loglevel. */
Logger.initialize(program, options.logLevel ?? LoggerLevel.INFO);
Expand Down

0 comments on commit d361584

Please sign in to comment.