fix: save no save bug

This commit is contained in:
熊潇 2025-03-09 00:55:21 +08:00
parent 9f5b3a61c0
commit af18b39248
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@kevisual/envision-cli",
"version": "0.0.28",
"version": "0.0.29-alpha.1",
"description": "envision command tools",
"main": "dist/index.js",
"type": "module",

View File

@ -8,6 +8,8 @@ import { chalk } from '@/module/chalk.ts';
import { loginInCommand } from '@/module/login/login-by-web.ts';
export const saveToken = async (token: string) => {
const baseURL = getBaseURL();
const config = getConfig();
writeConfig({ ...config, token });
const res = await runApp({ path: 'config', key: 'saveToken', payload: { baseURL, token } });
if (res.code !== 200) {
console.log('Set token failed', res.message || '');