mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fix no such file or directory when using login (#164)
This commit is contained in:
parent
19f9d26af9
commit
d6f1262c1c
1 changed files with 2 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ pub struct Login {
|
||||||
impl Execute for Login {
|
impl Execute for Login {
|
||||||
async fn execute(self, ctx: Context) -> Result<()> {
|
async fn execute(self, ctx: Context) -> Result<()> {
|
||||||
if let Some(login_file_path) = login_file_path() {
|
if let Some(login_file_path) = login_file_path() {
|
||||||
|
fs::create_dir_all(login_file_path.parent().unwrap())?;
|
||||||
|
|
||||||
match ctx.crunchy.session_token().await {
|
match ctx.crunchy.session_token().await {
|
||||||
SessionToken::RefreshToken(refresh_token) => Ok(fs::write(
|
SessionToken::RefreshToken(refresh_token) => Ok(fs::write(
|
||||||
login_file_path,
|
login_file_path,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue