Skip to content

Commit

Permalink
can generate typespec locally
Browse files Browse the repository at this point in the history
  • Loading branch information
iscai-msft committed May 30, 2024
1 parent ecbd172 commit 3d341ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/typespec-python/src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
SdkHttpOperation,
SdkServiceOperation,
} from "@azure-tools/typespec-client-generator-core";
import { resolveModuleRoot, saveCodeModelAsYaml } from "./external-process.js";
import { saveCodeModelAsYaml } from "./external-process.js";
import { dirname } from "path";
import { fileURLToPath } from "url";
import { execFileSync } from "child_process";
Expand Down Expand Up @@ -67,7 +67,7 @@ function createPythonSdkContext<TServiceOperation extends SdkServiceOperation>(
export async function $onEmit(context: EmitContext<PythonEmitterOptions>) {
const program = context.program;
const sdkContext = createPythonSdkContext<SdkHttpOperation>(context);
const root = path.join(dirname(fileURLToPath(import.meta.url)), "..", "pygen");
const root = path.join(dirname(fileURLToPath(import.meta.url)), "..", "..", "pygen");
const outputDir = context.emitterOutputDir;
const yamlMap = emitCodeModel(sdkContext);
addDefaultOptions(sdkContext);
Expand Down

0 comments on commit 3d341ab

Please sign in to comment.