Merge pull request #119 from covespace/fix_devchat_install_error

Improve secretStorage usage and pipx installation
This commit is contained in:
boob.yang 2023-05-28 10:11:19 +08:00 committed by GitHub
commit 84e41ab54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -177,7 +177,7 @@ function activate(context: vscode.ExtensionContext) {
const versionOld = await secretStorage.get("devchat_version_old");
const versionNew = extensionVersion;
const versionChanged = versionOld !== versionNew;
secretStorage.store("devchat_version_old", versionNew!);
await secretStorage.store("devchat_version_old", versionNew!);
// status item has three status type
// 1. not in a folder
@ -217,7 +217,7 @@ function activate(context: vscode.ExtensionContext) {
if (devchatStatus !== 'ready') {
statusBarItem.text = `$(warning)DevChat`;
statusBarItem.tooltip = `${devchatStatus}`;
statusBarItem.command = '';
statusBarItem.command = undefined;
// set statusBarItem warning color
return;
}

View File

@ -12,7 +12,7 @@ def check_pipx_installed():
def install_pipx():
print("Installing pipx...")
try:
subprocess.run(["python3", "-m", "pip", "install", "pipx"], check=True)
subprocess.run(["python3", "-m", "pip", "install", "pipx", "--force"], check=True)
print("pipx installed successfully.")
except subprocess.CalledProcessError as e:
print("Error installing pipx:", e, file=sys.stderr)