@aiyiran/myclaw 1.0.174 → 1.0.176
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/index.js +4 -3
- package/package.json +1 -1
- package/restrict.js +8 -0
package/index.js
CHANGED
|
@@ -479,10 +479,11 @@ pause >nul
|
|
|
479
479
|
'if (-not (Test-Path $workspaceLnk)) {',
|
|
480
480
|
' $ws2 = New-Object -ComObject WScript.Shell',
|
|
481
481
|
' $sc2 = $ws2.CreateShortcut($workspaceLnk)',
|
|
482
|
-
' $sc2.TargetPath =
|
|
483
|
-
' $sc2.
|
|
482
|
+
' $sc2.TargetPath = "$env:WINDIR\\explorer.exe"',
|
|
483
|
+
' $sc2.Arguments = \'\\\\wsl.localhost\\OpenClaw\\root\\.openclaw\\workspace\'',
|
|
484
|
+
' $sc2.WorkingDirectory = $env:USERPROFILE',
|
|
484
485
|
' $sc2.Description = \'OpenClaw Workspace\'',
|
|
485
|
-
' $sc2.IconLocation =
|
|
486
|
+
' $sc2.IconLocation = "$env:WINDIR\\System32\\imageres.dll,137"',
|
|
486
487
|
' $sc2.Save()',
|
|
487
488
|
' Write-Host \'[bat] workspace shortcut created\'',
|
|
488
489
|
'} else {',
|
package/package.json
CHANGED
package/restrict.js
CHANGED
|
@@ -109,8 +109,16 @@ function run() {
|
|
|
109
109
|
const existing = wslExec('cat /etc/wsl.conf 2>/dev/null') || '';
|
|
110
110
|
let newContent;
|
|
111
111
|
if (existing.includes('[automount]')) {
|
|
112
|
+
// 替换 automount 段,同时确保有 interop 段
|
|
112
113
|
newContent = existing.replace(/\[automount\][^\[]*/, '[automount]\nenabled = false\n');
|
|
114
|
+
if (!newContent.includes('[interop]')) {
|
|
115
|
+
newContent += '[interop]\nappendWindowsPath = false\n';
|
|
116
|
+
} else if (!newContent.includes('appendWindowsPath')) {
|
|
117
|
+
// 已有 [interop] 但没有 appendWindowsPath,追加
|
|
118
|
+
newContent = newContent.replace(/\[interop\]/, '[interop]\nappendWindowsPath = false');
|
|
119
|
+
}
|
|
113
120
|
} else {
|
|
121
|
+
// 没有 automount,追加两段
|
|
114
122
|
newContent = existing + (existing.endsWith('\n') ? '' : '\n') + '[automount]\nenabled = false\n[interop]\nappendWindowsPath = false\n';
|
|
115
123
|
}
|
|
116
124
|
|