CodeEditApp / CodeEditApp/CodeEdit
🐞 Pass LaunchAgents environment variable to shell
- 主要語言
- Swift
- 星號
- 23k
- 分支
- 1.2k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Description
I have set an environment variable using LaunchAgent (`launchctl setenv XDG_CONFIG_HOME /Users/yochem/Library/Config`) on startup.
It sets `XDG_CONFIG_HOME` to a location so my shell (fish in my case) knows its config location.
When I start iTerm2 or vscode, fish loads its config from the correct location (and XDG_CONFIG_HOME has a value). This is not the case with CodeEdit.
### To Reproduce
1. Create the following file:
~/Library/LaunchAgents/environment.plist
```xml
Label
my.startup
ProgramArguments
sh
-c
launchctl setenv XDG_CONFIG_HOME /tmp
RunAtLoad
```
2. `$ launchctl load ~/Library/LaunchAgents/environment.plist`
3. Open vscode, its terminal and run `$ echo $XDG_CONFIG_HOME`
> should show an empty line
4. Open CodeEdit, its terminal and run `$ echo $XDG_CONFIG_HOME`
> should print `/tmp`
### Expected Behavior
I expect that CodeEdit behaves the same as other applications, and is aware of environment variables set via the LaunchAgent. It should pass this environment to the shell.
### Version Information
CodeEdit: 0.0.3-alpha.36,5650b45
macOS: 14.0
Xcode: Not installed
### Additional Context
_No response_
### Screenshots
VSCode:
CodeEdit:
貢獻指南
研究方向
Start by tracing how CodeEdit launches its integrated terminal and supplies the shell environment; the issue provides environment.plist and a reproducible XDG_CONFIG_HOME check. Done when the CodeEdit terminal inherits the LaunchAgent variable and prints /tmp under the supplied reproduction steps.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- macos, shell, swift
- 領域
- cli, desktop
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100