Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonleblanc-rl committed Nov 2, 2024
1 parent d1c6541 commit c9607e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/@cdktf/commons/src/gradle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import { logger } from "./logging";
import { exec } from "./util";

export function isGradleProject(workingDirectory: string): boolean {
const buildGradlePath = path.join(workingDirectory, "build.gradle" || "build.gradle.kts");
const buildGradlePath = path.join(
workingDirectory,
"build.gradle" || "build.gradle.kts"
);

try {
fs.accessSync(buildGradlePath, fs.constants.R_OK | fs.constants.W_OK);
Expand Down Expand Up @@ -151,7 +154,10 @@ export async function getGradlePackageVersion(packageName: string) {
}

export async function getGradlePackageVersionFromBuild(packageName: string) {
const buildGradlePath = path.join(process.cwd(), "build.gradle" || "build.gradle.kts");
const buildGradlePath = path.join(
process.cwd(),
"build.gradle" || "build.gradle.kts"
);
const buildGradleContents = await fs.readFile(buildGradlePath, "utf-8");
const buildLines = buildGradleContents.split(/\r\n|\r|\n/);

Expand Down

0 comments on commit c9607e7

Please sign in to comment.