Use profile-detection instead of rules-detection

This commit is contained in:
Joe Danziger
2025-05-26 22:16:14 -04:00
parent 36e8257d08
commit c02a324641
4 changed files with 17 additions and 17 deletions

View File

@@ -17,8 +17,8 @@ import { RULES_PROFILES } from '../../../../src/constants/profiles.js';
import { RULES_ACTIONS } from '../../../../src/constants/rules-actions.js';
import {
wouldRemovalLeaveNoProfiles,
getInstalledRulesProfiles
} from '../../../../src/utils/rules-detection.js';
getInstalledProfiles
} from '../../../../src/utils/profile-detection.js';
import path from 'path';
import fs from 'fs';
@@ -58,7 +58,7 @@ export async function rulesDirect(args, log, context = {}) {
if (action === RULES_ACTIONS.REMOVE) {
// Safety check: Ensure this won't remove all rules profiles (unless forced)
if (!force && wouldRemovalLeaveNoProfiles(projectRoot, profiles)) {
const installedProfiles = getInstalledRulesProfiles(projectRoot);
const installedProfiles = getInstalledProfiles(projectRoot);
const remainingProfiles = installedProfiles.filter(
(profile) => !profiles.includes(profile)
);