Skip to content

osPath

Resolve durable local home and temp directories for Node hosts.

Home order (mkdir + write/delete probe; failure skips):

  1. os.homedir()
  2. HOME / USERPROFILE
  3. /home/app when config.isDatabricksAppEnv
  4. ./.home under cwd

Temp order (same ensure/probe/skip):

  1. os.tmpdir()
  2. TMPDIR / TMP / TEMP
  3. .tmp under the resolved home

Both paths are memoized per resolved cwd (same idea as @dbx-tools/core project command caching): cwd is part of the key because the ./.home / <home>/.tmp fallbacks depend on it.