Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): forward Bitbucket credentials from the login shell #9022

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

Showing 2 changed files with 76 additions and 0 deletions.

x
0 of 2 viewed, 2 left
53 additions and 0 deletionsapps/desktop/src/shell/DesktopShellEnvironment.test.tsModified
View file
@@ -152,6 +152,59 @@
}),
​
+ it.effect("hydrates Bitbucket credentials from the login shell on macOS", () =>
+ Effect.gen(function* () {
+ const env: NodeJS.ProcessEnv = {
+ SHELL: "/bin/zsh",
+ PATH: "/usr/bin",
+ };
+​
+ yield* runShellEnvironment({
+ env,
+ platform: "darwin",
+ handler: () =>
+ envOutput({
+ PATH: "/opt/homebrew/bin:/usr/bin",
+ T3CODE_BITBUCKET_ACCESS_TOKEN: "access-token",
+ T3CODE_BITBUCKET_EMAIL: "developer@example.com",
+ T3CODE_BITBUCKET_API_TOKEN: "api-token",
+ }),
+ });
+​
+ assert.equal(env.T3CODE_BITBUCKET_ACCESS_TOKEN, "access-token");
+ assert.equal(env.T3CODE_BITBUCKET_EMAIL, "developer@example.com");
+ assert.equal(env.T3CODE_BITBUCKET_API_TOKEN, "api-token");
+ }),
+ );
+​
+ it.effect("does not mix login-shell Bitbucket credentials into an inherited set", () =>