{"action":"opened","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/5180","repository_url":"https://api.github.com/repos/fish-shell/fish-shell","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/5180/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/5180/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/5180/events","html_url":"https://github.com/fish-shell/fish-shell/issues/5180","id":359028432,"node_id":"MDU6SXNzdWUzNTkwMjg0MzI=","number":5180,"title":"Fish on linux creates pipe named \".notifier\" in current directory when started without USER variable in the environment.","user":{"login":"chtison","id":17789536,"node_id":"MDQ6VXNlcjE3Nzg5NTM2","avatar_url":"https://avatars3.githubusercontent.com/u/17789536?v=4","gravatar_id":"","url":"https://api.github.com/users/chtison","html_url":"https://github.com/chtison","followers_url":"https://api.github.com/users/chtison/followers","following_url":"https://api.github.com/users/chtison/following{/other_user}","gists_url":"https://api.github.com/users/chtison/gists{/gist_id}","starred_url":"https://api.github.com/users/chtison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtison/subscriptions","organizations_url":"https://api.github.com/users/chtison/orgs","repos_url":"https://api.github.com/users/chtison/repos","events_url":"https://api.github.com/users/chtison/events{/privacy}","received_events_url":"https://api.github.com/users/chtison/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-11T12:39:32Z","updated_at":"2018-09-11T12:39:32Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPlease tell us which fish version you are using by executing the following:\r\n\r\n  fish --version\r\n  echo $version\r\n\r\nPlease tell us which operating system and terminal you are using. The output of `uname -a` and `echo $TERM` may be helpful in this regard although other commands might be relevant in your specific situation.\r\n\r\nPlease tell us if you tried fish without third-party customizations by executing this command and whether it affected the behaviour you are reporting:\r\n\r\n  sh -c 'env HOME=$(mktemp -d) fish'\r\n\r\nTell us how to reproduce the problem. Including an asciinema.org recording is useful for problems that involve the visual display of fish output such as its prompt.\r\n-->\r\n## Versions\r\n\r\nx86_64 GNU/Linux\r\nfish, version 2.7.1\r\n$version = 2.7.1\r\n$TERM = screen\r\n$USER = root\r\n\r\n## Behaviour\r\n\r\nWhen fish is started without USER variable set in environment, it creates a pipe named \".notifier\" in the working directory.\r\n\r\n```sh\r\n$ env --unset=USER fish\r\n$ ls -l .notifier\r\nprw------- 1 root root 0 Sep 11 11:25 .notifier|\r\n```\r\n\r\nThe USER variable is correctly set but not soon enough.\r\n\r\n```sh\r\n$ env USER=rofl fish\r\n$ ls -l /tmp/fish.rofl/\r\ntotal 0\r\nprw------- 1 root root 0 Sep 11 11:51 fishd.0242ac110004.notifier|\r\n$ echo $USER\r\nroot\r\n```\r\n\r\n## Issue\r\n\r\nhttps://github.com/fish-shell/fish-shell/blob/2.7.1/src/env_universal_common.cpp#L135-L137\r\n\r\nThe author of this code assumes USER is set but it is not at this time so function returns \"\" which is prepended to [\".notifier\"](https://github.com/fish-shell/fish-shell/blob/2.7.1/src/env_universal_common.cpp#L1399).\r\n\r\n## Workaround\r\n\r\nStart fish with USER variable correctly set in the env."}}
{"actor":{"display_login":"chtison"}}