Skip to content

Commit c1e97e2

Browse files
committed
update error message
1 parent ac3342a commit c1e97e2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ pub struct IssueQuery;
2222
async fn main() -> Result<(), Error> {
2323
let args = CliArgs::parse();
2424

25-
let token = std::env::var("GITHUB_ACCESS_TOKEN")?;
25+
let token = match std::env::var("GITHUB_ACCESS_TOKEN") {
26+
Ok(token) => token,
27+
Err(_) => anyhow::bail!(
28+
r"Please set enviroment GITHUB_ACCESS_TOKEN
29+
export GITHUB_ACCESS_TOKEN=xxxx"
30+
),
31+
};
2632
let client = github_client(&token)?;
2733

2834
run(client, args).await?;

0 commit comments

Comments
 (0)