resolve_rcfile_path

Function resolve_rcfile_path 

Source
pub async fn resolve_rcfile_path(
    env: &mut Env,
    file: InitFile,
) -> Result<String, DefaultFilePathError>
Expand description

Resolves the path to the rcfile.

This function resolves the path to the rcfile specified by the file argument. If the file is InitFile::Default, the default rcfile path is determined by calling default_rcfile_path.

This function returns an empty string in the following cases, in which case the rcfile should not be executed:

  • file is InitFile::None,
  • the Interactive shell option is off,
  • the real user ID of the process is not the same as the effective user ID, or
  • the real group ID of the process is not the same as the effective group ID.