[SERVER-39195] Fix getUserDir to not solely rely on env var HOME Created: 25/Jan/19  Updated: 29/Oct/23  Resolved: 19/Mar/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.6.10
Fix Version/s: 4.1.10

Type: Improvement Priority: Minor - P4
Reporter: Miłosz Suchy Assignee: ADAM Martin (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6
Sprint: Dev Tools 2019-02-11, Dev Tools 2019-02-25, Dev Tools 2019-03-11, Dev Tools 2019-03-25
Participants:
Linked BF Score: 0

 Description   

Shell should not rely solely on env var HOME. It's very often not set at all when launching scripts e.g from cron or other apps. This causes shell to output a warning that it could not save .dbshell and thus making it very hard to parse output from shell as it would result in malformed JSON when retrieving data.



 Comments   
Comment by Githook User [ 18/Mar/19 ]

Author:

{'email': 'adam.martin@10gen.com', 'name': 'ADAM David Alan Martin', 'username': 'adamlsd'}

Message: SERVER-39195 Make shell history file placement more correct.

Shell history file placement should rely upon more than just the
`$HOME` environment variable.

Resolves: #1294
Branch: master
https://github.com/mongodb/mongo/commit/159eba44d7aad44e49c688820b1b0331230236bf

Comment by Mira Carey [ 15/Mar/19 ]

reverted because it broke windows compile

Comment by Githook User [ 15/Mar/19 ]

Author:

{'name': 'Jason Carey', 'username': 'hanumantmk', 'email': 'jcarey@argv.me'}

Message: Revert "SERVER-39195 Make shell history file placement more correct."

This reverts commit 29dace0aaeb8299c759a15ea687cce841d509b6b.
Branch: master
https://github.com/mongodb/mongo/commit/6664b30dc1cc38b5985ce9920e1d00a490b280a5

Comment by Githook User [ 15/Mar/19 ]

Author:

{'name': 'ADAM David Alan Martin', 'username': 'adamlsd', 'email': 'adam.martin@10gen.com'}

Message: SERVER-39195 Make shell history file placement more correct.

Shell history file placement should rely upon more than just the
`$HOME` environment variable.

Resolves: #1294
Branch: master
https://github.com/mongodb/mongo/commit/29dace0aaeb8299c759a15ea687cce841d509b6b

Comment by Kelsey Schubert [ 25/Jan/19 ]

Thanks for signing the agreement yuxael, we'll have someone take a look.

Generated at Thu Feb 08 04:51:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.