dsh-gitbash-shell 0.18.1 → 0.18.2
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/dsh.plugin.json +1 -1
- package/package.json +1 -1
- package/src/index.js +10 -0
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-gitbash-shell",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"description": "Windows 全模式 Git Bash:用 Git for Windows bash 替换 PowerShell 执行器,并物化 standard/minimal/code/cordis 的 Git Bash 变体 preset。双 era 适配 dsh <= 0.1.1(内置 id 'code')与 >= 0.1.2(改名 'ptc'),启动探测自动选择,preset id 永不变。联动:dsh-ptc-cordis-preset(两者同装时 PTC 创造模式自动物化为 Git Bash 版)+ dsh-better-sidebar(终端 UI 标签与模型 terminal_* 工具自动切到 Git Bash)。",
|
|
6
6
|
"engines": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-gitbash-shell",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"description": "Windows 上让 agent 的每条 shell 命令改经 Git for Windows bash 执行;物化四个内置预设的 Git Bash 变体,统一 MSYS 盘根路径方言,侧栏终端接管可开关。· Run every agent shell command through Git for Windows bash on Windows; materialize Git Bash variants of the built-in presets, unify the MSYS drive-root path dialect, and adopt the sidebar terminal behind a switch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/index.js
CHANGED
|
@@ -892,6 +892,16 @@ export function buildTranslateEnv() {
|
|
|
892
892
|
const t = tmpdir()
|
|
893
893
|
if (t && existsSync(t)) env.tmpDir = t.replace(/\\/g, '/')
|
|
894
894
|
} catch { /* keep undefined */ }
|
|
895
|
+
// v0.18.2: in an EMPTY-env process (the PTC run_code child) os.tmpdir()
|
|
896
|
+
// degrades to a garbage path and the guard above drops it — fall back to
|
|
897
|
+
// the standard Windows per-user temp layout under the detected home, so
|
|
898
|
+
// importing this module from inside run_code still translates /tmp.
|
|
899
|
+
if (!env.tmpDir && process.platform === 'win32') {
|
|
900
|
+
try {
|
|
901
|
+
const fallback = join(homedir(), 'AppData', 'Local', 'Temp')
|
|
902
|
+
if (existsSync(fallback)) env.tmpDir = fallback.replace(/\\/g, '/')
|
|
903
|
+
} catch { /* keep undefined */ }
|
|
904
|
+
}
|
|
895
905
|
try {
|
|
896
906
|
const h = homedir()
|
|
897
907
|
if (h && existsSync(h)) env.home = h.replace(/\\/g, '/')
|