Commit e41ba65
authored
fix(nx-cloud): download light client to tmp dir when outside nx workspace (#34805)
## Current Behavior
When running nx commands outside of an Nx workspace (no nx.json), the
light client is downloaded to .nx/cache/cloud relative to process.cwd().
This creates an unwanted .nx folder in whatever directory the user
happens to be in.
## Expected Behavior
When outside an Nx workspace, the light client is downloaded to a temp
directory (os.tmpdir()/nx-cloud-client/hash) where hash is derived from
the NX_CLOUD_API URL. This avoids polluting arbitrary directories with
.nx folders while ensuring different cloud instances get separate
directories.
When inside an Nx workspace, behavior is unchanged.1 parent 6b8d5c9 commit e41ba65
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
159 | 172 | | |
160 | 173 | | |
161 | 174 | | |
| |||
0 commit comments