CodeEditApp / CodeEditApp/CodeEdit
🐞 Pass LaunchAgents environment variable to shell
- Linguagem predominante
- Swift
- Estrelas
- 23k
- Forks
- 1.2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
### 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:
Guia de contribuição
Direção de pesquisa
Comece rastreando como o CodeEdit inicia seu terminal integrado e fornece o ambiente do shell; a issue fornece environment.plist e uma verificação reproduzível de XDG_CONFIG_HOME. Está concluído quando o terminal do CodeEdit herdar a variável do LaunchAgent e imprimir /tmp seguindo as etapas de reprodução fornecidas.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- macos, shell, swift
- Domínio
- cli, desktop
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 35/100