Skip to content
Source
Sign inSign up
pingdotgg/t3code

Disable SSH askpass for upstream status fetches #1921

Closedmerrkry(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/1921/headopened View on GitHub

Showing 2 changed files with 10 additions and 0 deletions.

x
0 of 2 viewed, 2 left
5 additions and 0 deletionsapps/server/src/git/Layers/GitCore.test.tsModified
View file
@@ -1023,9 +1023,11 @@
expect(yield* git(source, ["branch", "--show-current"])).toBe("upstream/feature");
const realGitCore = yield* GitCore;
let fetchArgs: readonly string[] | null = null;
+ let fetchEnv: NodeJS.ProcessEnv | undefined;
const core = yield* makeIsolatedGitCore((input) => {
if (input.args[0] === "--git-dir" && input.args[2] === "fetch") {
fetchArgs = [...input.args];
+ fetchEnv = input.env;
return Effect.succeed({
code: 0,
stdout: "",
@@ -1049,6 +1051,9 @@
remoteName,
`+refs/heads/${featureBranch}:refs/remotes/${remoteName}/${featureBranch}`,
+ expect(fetchEnv).toEqual({
+ SSH_ASKPASS_REQUIRE: "never",
+ });
5 additions and 0 deletionsapps/server/src/git/Layers/GitCore.tsModified
View file
@@ -87,6 +87,7 @@
​
interface ExecuteGitOptions {