abiosoft / ishell

Library for creating interactive cli applications.
MIT License
1.68k stars 195 forks source link

Use os.UserHomeDir instead of os.Getenv #120

Closed karagenc closed 5 years ago

karagenc commented 5 years ago

This way, SetHomeHistoryPath function works for all operating systems.

karagenc commented 5 years ago

Travis check failed because os.UserHomeDir doesn't work with go version 1.10.8. But in my go version (which is 1.12.5) it works.

abiosoft commented 5 years ago

That function was introduced in Go 1.12 and I'm currently reluctant to make Go 1.12 a requirement for this library. I'll see if I can find a middle ground.

karagenc commented 5 years ago

Wohooo! I achieved it with user.Current, and tests are passed successfully Thank you for your time