Skip to content

Commit

Permalink
fix: update command
Browse files Browse the repository at this point in the history
  • Loading branch information
pxseu committed Feb 25, 2023
1 parent 40393b6 commit 319e5b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/commands/update/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use super::util::{
use crate::config::{ARCH, VERSION};
use crate::state::http::HttpClient;
use crate::state::State;
use crate::store::Store;
use crate::utils::capitalize;

#[derive(Debug, Parser)]
Expand Down
5 changes: 3 additions & 2 deletions src/store/context.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use anyhow::Result;
use anyhow::{anyhow, Result};
use serde::{Deserialize, Serialize};
use tokio::fs::{self, File};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
Expand All @@ -9,6 +9,7 @@ use super::utils::home_path;
use super::Storable;
use crate::commands::auth::types::AuthorizedClient;
use crate::commands::projects::types::Project;
use crate::config::EXEC_NAME;
use crate::impl_store;

#[derive(Debug, Serialize, Deserialize, Clone, Default)]
Expand Down Expand Up @@ -65,7 +66,7 @@ impl Context {

#[inline]
pub fn current_project_error(self) -> Result<Project> {
self.current_project().context("No project specified, run `{EXEC_NAME} projects switch` or use --project to specify a project")
self.current_project().with_context(|| anyhow!("No project specified, run `{EXEC_NAME} projects switch` or use --project to specify a project"))
}

// for future use with external package managers
Expand Down

0 comments on commit 319e5b5

Please sign in to comment.