mario-eth / soldeer

Solidity Package Manager written in rust
MIT License
188 stars 19 forks source link

Login file (security file) cannot be customized with SOLDEER_LOGIN_FILE #119

Closed beeb closed 1 month ago

beeb commented 1 month ago

The location of the login session file (security file) should be customizable with the SOLDEER_LOGIN_FILE environment variable. However, the current implementation only reads from this variable at compile time with option_env!.

It should be read at runtime, the define_security_file_location function must be fixed with std::env::var.

In that function, we should also improve error handling. First, if the home directory cannot be found, the current directory should be used as fallback. Then, errors during creation of the security directory should also be handled properly by returning a Result from the function.