Skip to content

Commit

Permalink
fix PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ErwanRaulo committed Jul 15, 2024
1 parent 283bbe7 commit 4ce6661
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/cloneGITRepository.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Import Node.js Dependencies
import { execFile } from "node:child_process";
import { promisify } from "node:util";

const execFilePromise = promisify(execFile);
/**
* @async
* @function cloneGITRepository
Expand All @@ -12,10 +14,8 @@ import { promisify } from "node:util";
*/
export async function cloneGITRepository(dir, url) {
const oauthUrl = url.replace("https://", `https://oauth2:${process.env.GIT_TOKEN}@`);
const execFile = promisify((await import("node:child_process")).execFile);

await execFile("git", ["clone", oauthUrl, dir]);
await execFilePromise("git", ["clone", oauthUrl, dir]);

return dir;
}

0 comments on commit 4ce6661

Please sign in to comment.