···418418419419 #[error("Incorrect Hex one-time-password")]
420420 IncorrectHexOneTimePassword,
421421+422422+ #[error("{path} could not be added to the tarball as it is outside the project root")]
423423+ TarPathOutsideOfProjectRoot { path: Utf8PathBuf },
421424}
422425423426#[derive(Debug, Eq, PartialEq, Clone, Copy)]
···988991You'll need to re-authenticate to continue using Hex."
989992 .into(),
990993 hint: Some("Run 'gleam hex authenticate' to log in again.".into()),
994994+ level: Level::Error,
995995+ location: None,
996996+ }],
997997+998998+ Error::TarPathOutsideOfProjectRoot { path } => vec![Diagnostic {
999999+ title: "Cannot add path to tar archive".into(),
10001000+ text: wrap(&format!(
10011001+ "The path {path} is outside this Gleam project, \
10021002+so we cannot safely add it to the archive for publishing. If we permitted this \
10031003+then malicious actors could abuse this functionality to trick you into sharing \
10041004+your private information.
10051005+10061006+Move the file into your Gleam project and try again."
10071007+ )),
10081008+ hint: None,
9911009 level: Level::Error,
9921010 location: None,
9931011 }],