ags(scripts/utils): add a function to check if an app is installed

This commit is contained in:
retrozinndev
2025-04-26 22:42:21 -03:00
parent b037edd0ba
commit 05dc2a86db
+8
View File
@@ -26,3 +26,11 @@ export function makeDirectory(dir: string): void {
export function deleteFile(path: string): void {
execAsync([ "rm", "-r", path ]);
}
export function isInstalled(commandName: string): boolean {
const output = exec(["command", "-v", commandName]);
if(output)
return true;
return false;
}