@jeremyy_prt/cc-config 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.js +10 -9
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -95,13 +95,14 @@ function installShellAliases() {
|
|
|
95
95
|
console.log('🔧 Installation des alias shell...');
|
|
96
96
|
|
|
97
97
|
if (isWindows) {
|
|
98
|
-
// PowerShell profile
|
|
99
|
-
const
|
|
100
|
-
process.env.USERPROFILE,
|
|
101
|
-
'Documents',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
// PowerShell profile - try both locations
|
|
99
|
+
const possiblePaths = [
|
|
100
|
+
path.join(process.env.USERPROFILE, 'Documents', 'PowerShell', 'Microsoft.PowerShell_profile.ps1'),
|
|
101
|
+
path.join(process.env.USERPROFILE, 'Documents', 'WindowsPowerShell', 'Microsoft.PowerShell_profile.ps1')
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
// Find existing profile or use first path
|
|
105
|
+
let profilePath = possiblePaths.find(p => fs.existsSync(p)) || possiblePaths[0];
|
|
105
106
|
|
|
106
107
|
// Create profile directory if it doesn't exist
|
|
107
108
|
const profileDir = path.dirname(profilePath);
|
|
@@ -123,10 +124,10 @@ function ccc { claude --dangerously-skip-permissions -c @args }
|
|
|
123
124
|
|
|
124
125
|
if (!content.includes('Claude Code aliases')) {
|
|
125
126
|
fs.appendFileSync(profilePath, aliases);
|
|
126
|
-
console.log(
|
|
127
|
+
console.log(` ✓ Alias PowerShell installés dans ${path.basename(profilePath)}`);
|
|
127
128
|
console.log(' → Redémarre PowerShell pour les activer');
|
|
128
129
|
} else {
|
|
129
|
-
console.log(
|
|
130
|
+
console.log(` ✓ Alias déjà présents dans ${path.basename(profilePath)}`);
|
|
130
131
|
}
|
|
131
132
|
} else {
|
|
132
133
|
// Unix-like (Mac/Linux)
|