pinokiod 7.2.6 → 7.2.7

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.
Files changed (2) hide show
  1. package/kernel/shell.js +19 -0
  2. package/package.json +1 -1
package/kernel/shell.js CHANGED
@@ -67,6 +67,18 @@ function stripInheritedCondaActivationState(env) {
67
67
  }
68
68
  }
69
69
 
70
+ function setDefaultEnvValue(env, key, value) {
71
+ const existingKey = Object.keys(env).find((envKey) => envKey.toLowerCase() === key.toLowerCase())
72
+ if (!existingKey) {
73
+ env[key] = value
74
+ return
75
+ }
76
+ const existingValue = env[existingKey]
77
+ if (typeof existingValue !== "string" || !existingValue.trim()) {
78
+ env[existingKey] = value
79
+ }
80
+ }
81
+
70
82
  // xterm.js currently ignores DECSYNCTERM (CSI ? 2026 h/l) and renders it as text on Windows.
71
83
  // filterDecsync() removes these sequences so they do not pollute the terminal output.
72
84
  class Shell {
@@ -281,6 +293,13 @@ class Shell {
281
293
  }
282
294
  }
283
295
 
296
+ if (this.platform === "win32") {
297
+ // Hugging Face file symlinks regularly fail on non-admin Windows setups.
298
+ // Default to no-symlink cache mode unless the user/app explicitly overrides it.
299
+ setDefaultEnvValue(this.env, "HF_HUB_DISABLE_SYMLINKS", "1")
300
+ setDefaultEnvValue(this.env, "HF_HUB_DISABLE_SYMLINKS_WARNING", "1")
301
+ }
302
+
284
303
  stripInheritedCondaActivationState(this.env)
285
304
  this.env[PATH_KEY] = stripBluefairyShimPaths(this.env[PATH_KEY], this.platform)
286
305
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "7.2.6",
3
+ "version": "7.2.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {