Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions apps/desktop/src/lib/trpc/routers/workspaces/utils/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import friendlyWords = require("friendly-words");
import type { BranchPrefixMode } from "@superset/local-db";
import simpleGit, { type StatusResult } from "simple-git";
import { runWithPostCheckoutHookTolerance } from "../../utils/git-hook-tolerance";
import { checkGitLfsAvailable, getShellEnvironment } from "./shell-env";
import {
checkGitLfsAvailable,
execWithShellEnv,
getShellEnvironment,
} from "./shell-env";

const execFileAsync = promisify(execFile);

Expand Down Expand Up @@ -1681,10 +1685,8 @@ export async function getPrInfo({
repo: string;
prNumber: number;
}): Promise<PullRequestInfo> {
const env = await getGitEnv();

try {
const { stdout } = await execFileAsync(
const { stdout } = await execWithShellEnv(
"gh",
[
"pr",
Expand All @@ -1695,7 +1697,7 @@ export async function getPrInfo({
"--json",
"number,title,headRefName,headRepository,headRepositoryOwner,isCrossRepository",
],
{ env, timeout: 30_000 },
{ timeout: 30_000 },
);

return JSON.parse(stdout) as PullRequestInfo;
Expand Down
Loading