CodeEditApp / CodeEditApp/CodeEdit

🐞 Pass LaunchAgents environment variable to shell

Đang mở
#1,442 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug needs refinement other terminal
Ngôn ngữ chính
Swift
Star
23k
Fork
1.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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:
image

CodeEdit:
image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách truy vết cách CodeEdit khởi chạy terminal tích hợp và cung cấp môi trường shell; issue cung cấp environment.plist và một bước kiểm tra XDG_CONFIG_HOME có thể tái hiện. Hoàn tất khi terminal CodeEdit kế thừa biến LaunchAgent và in ra /tmp theo các bước tái hiện được cung cấp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos, shell, swift
Lĩnh vực
cli, desktop
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.