1- import { Command } from "./command.mjs" ;
1+ import { CommandWithArgs } from "./command.mjs" ;
22import Logger from "../logger.mjs" ;
33import { window } from "vscode" ;
44import { rimraf } from "rimraf" ;
55import { join } from "path" ;
66import { homedir } from "os" ;
77import { unknownErrorToString } from "../utils/errorHelper.mjs" ;
88
9- export default class UninstallPicoSDKCommand extends Command {
9+ export default class UninstallPicoSDKCommand extends CommandWithArgs {
1010 private _logger : Logger = new Logger ( "UninstallPicoSDKCommand" ) ;
1111
1212 public static readonly id = "uninstallPicoSDK" ;
@@ -15,22 +15,25 @@ export default class UninstallPicoSDKCommand extends Command {
1515 super ( UninstallPicoSDKCommand . id ) ;
1616 }
1717
18- async execute ( ) : Promise < void > {
18+ async execute ( force = false ) : Promise < void > {
1919 // show modal warning that this will delete the Pico SDK and
2020 // all its automatically installed dependencies from the system
2121 // and ask for confirmation
2222
23- const response = await window . showWarningMessage (
24- "Uninstalling Pico SDK - Are you sure you want to continue?" ,
25- {
26- modal : true ,
27- detail :
28- "This will delete the Pico SDK and all its automatically installed " +
29- "dependencies from the system. This action cannot be undone." ,
30- } ,
31- "Yes" ,
32- "No"
33- ) ;
23+ const response = force
24+ ? "Yes"
25+ : await window . showWarningMessage (
26+ "Uninstalling Pico SDK - Are you sure you want to continue?" ,
27+ {
28+ modal : true ,
29+ detail :
30+ "This will delete the Pico SDK and all its automatically " +
31+ "installed dependencies from the system. " +
32+ "This action cannot be undone." ,
33+ } ,
34+ "Yes" ,
35+ "No"
36+ ) ;
3437
3538 if ( response === "Yes" ) {
3639 // uninstall the Pico SDK and all its automatically installed dependencies
0 commit comments