Skip to content

Commit 0f9345b

Browse files
committed
check login status
1 parent a9f8f18 commit 0f9345b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tmc-langs-core/src/tmc_core.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ impl TmcCore {
474474
submission_path: &Path,
475475
locale: Option<Language>,
476476
) -> Result<NewSubmission, CoreError> {
477+
if self.token.is_none() {
478+
return Err(CoreError::NotLoggedIn);
479+
}
480+
477481
self.progress("Compressing submission...".to_string(), 0.0, None)?;
478482
let compressed = task_executor::compress_project(submission_path)?;
479483
let mut file = NamedTempFile::new().map_err(CoreError::TempFile)?;

0 commit comments

Comments
 (0)