Skip to main content
Module

x/pbkit/cli/pbkit/unuseCurrentVersion.ts

Protobuf toolkit for modern web development
Latest
File
import { getCurrentVersion, setCurrentVersion } from "./current-version.ts";import { getToplevelCommands } from "./toplevel-commands.ts";
export default async function unuseCurrentVersion(): Promise<void> { const currentVersion = getCurrentVersion(); if (!currentVersion) return; setCurrentVersion(); try { console.log(`Uninstalling ${currentVersion}...`); for (const command of getToplevelCommands(currentVersion)) { await Deno.run({ cmd: ["deno", "uninstall", command] }).status(); } } catch {}}