{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/6110","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/6110/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/6110/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/6110/events","html_url":"https://github.com/Microsoft/vscode/issues/6110","id":153118681,"number":6110,"title":"Code on insiders started from GUI does not pick up environment variables on Linux","user":{"login":"nwgh","id":98339,"avatar_url":"https://avatars.githubusercontent.com/u/98339?v=3","gravatar_id":"","url":"https://api.github.com/users/nwgh","html_url":"https://github.com/nwgh","followers_url":"https://api.github.com/users/nwgh/followers","following_url":"https://api.github.com/users/nwgh/following{/other_user}","gists_url":"https://api.github.com/users/nwgh/gists{/gist_id}","starred_url":"https://api.github.com/users/nwgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwgh/subscriptions","organizations_url":"https://api.github.com/users/nwgh/orgs","repos_url":"https://api.github.com/users/nwgh/repos","events_url":"https://api.github.com/users/nwgh/events{/privacy}","received_events_url":"https://api.github.com/users/nwgh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/vscode/labels/bug","name":"bug","color":"E57E7E"},{"url":"https://api.github.com/repos/Microsoft/vscode/labels/needs%20more%20info","name":"needs more info","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"dbaeumer","id":1931590,"avatar_url":"https://avatars.githubusercontent.com/u/1931590?v=3","gravatar_id":"","url":"https://api.github.com/users/dbaeumer","html_url":"https://github.com/dbaeumer","followers_url":"https://api.github.com/users/dbaeumer/followers","following_url":"https://api.github.com/users/dbaeumer/following{/other_user}","gists_url":"https://api.github.com/users/dbaeumer/gists{/gist_id}","starred_url":"https://api.github.com/users/dbaeumer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbaeumer/subscriptions","organizations_url":"https://api.github.com/users/dbaeumer/orgs","repos_url":"https://api.github.com/users/dbaeumer/repos","events_url":"https://api.github.com/users/dbaeumer/events{/privacy}","received_events_url":"https://api.github.com/users/dbaeumer/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2016-05-04T21:25:58Z","updated_at":"2016-05-26T15:42:13Z","closed_at":null,"body":"- VSCode Version: 1.1.0-insider (1f0657703be5609d70088b0385bc27db8cc03a41)\r\n- OS Version: Fedora 23\r\n\r\nSteps to Reproduce:\r\n\r\n1. Launch vscode-insiders using the app launcher\r\n2. Attempt to build mozilla/gecko-dev with a vscode configuration from nwgh/gecko-vscode and zsh configuration from nwgh/homedir (this uses the \"Full Build\" task, though I suspect any task would exhibit the same behavior).\r\n3. While the build succeeds, the output is in an unexpected directory.\r\n\r\nLet me expand in a way that doesn't involve steps - I use the MOZCONFIG environment variable to tell the firefox build system how to build (what compiler to use, what object directory to use, config options, etc) - this environment variable points to a file that contains the instructions for the build system. When I build from the cli, or from an instance of code started from the cli, this works fine (my environment is picked up just fine). However, when I run from an instance of code started from the GNOME app launcher, my environment is not picked up at all, causing confusion.\r\n\r\nI have put minimal files that exhibit this behavior at https://gist.github.com/nwgh/c7b71148908bea753a78685ffad03210\r\n\r\nFrom that gist, `.zshrc` should go in `$HOME`, `mach` should go in some directory (call it `srcdir`), and tasks.json should go in `srcdir/.vscode`. Then, open code, open `srcdir` in code, and run the `Full Build` task.\r\n\r\nThis worked on 0.10.15-insider (my previous build on the same machine - sorry I don't have a better build to work from for bisecting).\r\n\r\nThis behavior does not happen on my mac install of the exact same version of code.\r\n\r\nFor now, I have worked around this by making my build task a shell script that invokes zsh as an interactive shell (to pick up my environment) with a script that calls the firefox build system. I could also likely work around this with os-specific properties in my tasks.json that replicates the work my shell does, or some extra layer of indirection within my mozconfig that replicates the work my shell already does (since a mozconfig is just a shell script). However, that seems... ugly, and prone to break in the future when I inevitably change something in my shell config."},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/221909561","html_url":"https://github.com/Microsoft/vscode/issues/6110#issuecomment-221909561","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/6110","id":221909561,"user":{"login":"nwgh","id":98339,"avatar_url":"https://avatars.githubusercontent.com/u/98339?v=3","gravatar_id":"","url":"https://api.github.com/users/nwgh","html_url":"https://github.com/nwgh","followers_url":"https://api.github.com/users/nwgh/followers","following_url":"https://api.github.com/users/nwgh/following{/other_user}","gists_url":"https://api.github.com/users/nwgh/gists{/gist_id}","starred_url":"https://api.github.com/users/nwgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwgh/subscriptions","organizations_url":"https://api.github.com/users/nwgh/orgs","repos_url":"https://api.github.com/users/nwgh/repos","events_url":"https://api.github.com/users/nwgh/events{/privacy}","received_events_url":"https://api.github.com/users/nwgh/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T15:42:12Z","updated_at":"2016-05-26T15:42:12Z","body":"@dbaeumer that's all correct - first works when starting from GUI, second doesn't. Both work when starting from CLI.\r\n\r\n`MOZCONFIG` is set in a (os-specific) rc script that is sourced from my `~/.zshrc`\r\n\r\nI'm now wondering if this isn't getting picked up because whatever source code uses to get environment variables on linux isn't running zsh as an interactive shell (which means `~/.zshrc` would never get sourced). I'll try putting stuff in `~/.zprofile` (which is used for login shells) and `~/.zshenv` (used by all shells) and report back - maybe I just need to refactor my init scripts a little bit!"}}
{"actor":{"display_login":"nwgh"}}