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.
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 withoption_env!
.It should be read at runtime, the
define_security_file_location
function must be fixed withstd::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.