fuzzrunx 0.1.3 → 0.1.4
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/package.json +1 -1
- package/src/installer.js +15 -4
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -27,10 +27,21 @@ function getBinPath(packageRoot) {
|
|
|
27
27
|
function getProfileTargets() {
|
|
28
28
|
const home = os.homedir();
|
|
29
29
|
if (process.platform === 'win32') {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const roots = new Set([path.join(home, 'Documents')]);
|
|
31
|
+
const oneDriveRoots = [
|
|
32
|
+
process.env.OneDrive,
|
|
33
|
+
process.env.OneDriveConsumer,
|
|
34
|
+
process.env.OneDriveCommercial
|
|
35
|
+
].filter(Boolean);
|
|
36
|
+
for (const root of oneDriveRoots) {
|
|
37
|
+
roots.add(path.basename(root).toLowerCase() === 'documents' ? root : path.join(root, 'Documents'));
|
|
38
|
+
}
|
|
39
|
+
const targets = [];
|
|
40
|
+
for (const root of roots) {
|
|
41
|
+
targets.push(path.join(root, 'PowerShell', 'Microsoft.PowerShell_profile.ps1'));
|
|
42
|
+
targets.push(path.join(root, 'WindowsPowerShell', 'Microsoft.PowerShell_profile.ps1'));
|
|
43
|
+
}
|
|
44
|
+
return [...new Set(targets)];
|
|
34
45
|
}
|
|
35
46
|
return [path.join(home, '.bashrc'), path.join(home, '.zshrc')];
|
|
36
47
|
}
|