Skip to content

Commit

Permalink
Don't error if HOME isn't set, since it is apparentl ynot a problem?
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Nov 24, 2023
1 parent f072444 commit dd8a3b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cli/subcommand/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ pub enum Error {
#[error("__ETC_PROFILE_NIX_SOURCED is set, indicating the relevant environment variables have already been set.")]
AlreadyRun,

#[error("Some of the paths for XDG_DATA_DIR are not valid, due to an illegal character, like a space or colon.")]
#[error("Some of the paths from Nix for XDG_DATA_DIR are not valid, due to an illegal character, like a colon.")]
InvalidXdgDataDirs(Vec<PathBuf>),

#[error("Some of the paths for PATH are not valid, due to an illegal character, like a space or colon.")]
#[error("Some of the paths from Nix for PATH are not valid, due to an illegal character, like a colon.")]
InvalidPathDirs(Vec<PathBuf>),

#[error("Some of the paths for MANPATH are not valid, due to an illegal character, like a space or colon.")]
#[error("Some of the paths from Nix for MANPATH are not valid, due to an illegal character, like a colon.")]
InvalidManPathDirs(Vec<PathBuf>),
}

Expand Down Expand Up @@ -69,8 +69,8 @@ impl CommandExecute for Export {
#[tracing::instrument(level = "trace", skip_all)]
async fn execute(self) -> eyre::Result<ExitCode> {
let env = match calculate_environment() {
Err(Error::AlreadyRun) => {
debug!("Already set the environment vars, not doing it again.");
e @ Err(Error::AlreadyRun | Error::HomeNotSet) => {
debug!("Ignored error: {:?}", e);
return Ok(ExitCode::SUCCESS);
},
Err(e) => {
Expand Down

0 comments on commit dd8a3b9

Please sign in to comment.