fix(desktop): backfill SSH_AUTH_SOCK from login shell on macOS #972
Mergedstickerdaniel(GitHub profile, opens in a new tab)merged 6 commits into
main fromrefs/pull/972/headmerged by juliusmarminge View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
- packages/shared/src/shell.ts line 49OutdatedResolvedby stickerdaniel(GitHub profile, opens in a new tab)@@ -33,0 +29,21 @@29+ return readEnvironmentFromLoginShell(shell, ["PATH"], execFile).PATH;30+}31+32+function envCaptureStart(name: string): string {33+ return `__T3CODE_ENV_${name}_START__`;34+}35+36+function envCaptureEnd(name: string): string {37+ return `__T3CODE_ENV_${name}_END__`;38+}39+40+function buildEnvironmentCaptureCommand(names: ReadonlyArray<string>): string {41+ return names42+ .map((name) => {43+ if (!SHELL_ENV_NAME_PATTERN.test(name)) {44+ throw new Error(`Unsupported environment variable name: ${name}`);45+ }46+47+ return [48+ `printf '%s\\n' '${envCaptureStart(name)}'`,49+ `printenv ${name}`,packages/shared/src/shell.ts line 66OutdatedResolvedby stickerdaniel(GitHub profile, opens in a new tab)@@ -33,0 +46,21 @@46+47+ return [48+ `printf '%s\\n' '${envCaptureStart(name)}'`,49+ `printenv ${name}`,50+ `printf '%s\\n' '${envCaptureEnd(name)}'`,51+ ].join("; ");52+ })53+ .join("; ");54+}55+56+function extractEnvironmentValue(output: string, name: string): string | undefined {57+ const startMarker = envCaptureStart(name);58+ const endMarker = envCaptureEnd(name);59+ const startIndex = output.indexOf(startMarker);60+ if (startIndex === -1) return undefined;61+62+ const valueStartIndex = startIndex + startMarker.length;63+ const endIndex = output.indexOf(endMarker, valueStartIndex);64+ if (endIndex === -1) return undefined;65+66+ const value = output.slice(valueStartIndex, endIndex).trim();
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
juliusmarminge reviewed
juliusmarminge merged this765c1dc
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
7b2148d1-de5f-46c6-b7ce-b4f50b78f692You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share