updates
This commit is contained in:
@@ -10,8 +10,8 @@ import {
|
||||
readFileToString,
|
||||
resolveFilename,
|
||||
} from "https://global.hatter.ink/script/get/@16/deno-commons-mod.ts";
|
||||
import { parseArgs } from "jsr:@std/cli/parse-args";
|
||||
import { writeStringToFile } from "../libraries/deno-commons-mod.ts";
|
||||
import {parseArgs} from "jsr:@std/cli/parse-args";
|
||||
import {writeStringToFile} from "../libraries/deno-commons-mod.ts";
|
||||
|
||||
const PYTHON_CONFIG_FILE = "~/.config/python-config.json";
|
||||
const PYTHON_VENV_DEFAULT_BASE_DIR = "~/.venv/";
|
||||
@@ -358,18 +358,16 @@ python.ts remove-venv --venv test-env`);
|
||||
|
||||
const yesOrNo = prompt("Please confirm (yes/no):");
|
||||
if (yesOrNo === "yes" || yesOrNo === "y") {
|
||||
// DO CONFIRM YES
|
||||
// TODO
|
||||
const path = pythonVenvProfile.path;
|
||||
log.info(`Remove path: ${path}`);
|
||||
|
||||
await new ProcessBar(`Removing path ${path}`).call(async () => {
|
||||
await Deno.remove(path, { recursive: true });
|
||||
});
|
||||
|
||||
delete pythonConfig.profiles[flags.venv];
|
||||
await savePythonConfig(pythonConfig);
|
||||
log.success(`Remove virtual environment: ${flags.venv}`);
|
||||
log.success(
|
||||
`Virtual environment: '${flags.venv}' removed, path: ${path}`,
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
`Your input '${yesOrNo}', skip remove the virtual environment`,
|
||||
|
||||
Reference in New Issue
Block a user