| use turbo_rcstr::rcstr; | |
| use turbo_tasks::{ResolvedVc, Vc}; | |
| use turbo_tasks_fs::FileSystemPath; | |
| use turbopack_core::issue::{Issue, IssueStage, OptionStyledString, StyledString}; | |
| /// An issue that occurred while resolving the parsing or evaluating the .env. | |
| pub struct ProcessEnvIssue { | |
| pub path: FileSystemPath, | |
| pub description: ResolvedVc<StyledString>, | |
| } | |
| impl Issue for ProcessEnvIssue { | |
| fn title(&self) -> Vc<StyledString> { | |
| StyledString::Text(rcstr!("Error loading dotenv file")).cell() | |
| } | |
| fn stage(&self) -> Vc<IssueStage> { | |
| IssueStage::Load.into() | |
| } | |
| fn file_path(&self) -> Vc<FileSystemPath> { | |
| self.path.clone().cell() | |
| } | |
| fn description(&self) -> Vc<OptionStyledString> { | |
| Vc::cell(Some(self.description)) | |
| } | |
| } | |