Skip to content

Commit

Permalink
chore: use the right paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mutahhir committed Jul 14, 2023
1 parent 032d984 commit 6babff7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cdktf-cli/src/bin/cmds/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export async function convert({ language, provider, stack }: any) {
process.chdir(tempDir);

const projectRoot = projectRootPath();
const dist = path.resolve(projectRoot, "./dist");
const dist = path.resolve(projectRoot, "../../dist");

logger.setLevel("ERROR");
await init({
Expand Down
9 changes: 8 additions & 1 deletion packages/cdktf-cli/src/bin/cmds/helper/init-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import * as fs from "fs-extra";
import * as path from "path";
import { projectRootPath } from "./utilities";

export const templatesDir = path.join(projectRootPath(), "templates");
export const templatesDir = path.join(
projectRootPath(),
"..",
"@cdktf",
"cli-core",
"templates"
);

const availableTemplates = fs
.readdirSync(templatesDir)
.filter((x) => !x.startsWith("."));
Expand Down

0 comments on commit 6babff7

Please sign in to comment.