Commit 973c740
committed
fix(update): prefer package root as managed-service handoff cwd
When a global install triggered an update from the Dashboard, the managed
service handoff script fell back to os.homedir() as its working directory.
This caused the update command (e.g. node dist/index.js update ...) to run
in the wrong directory, so the relative entry path could not be resolved and
the update silently failed after gateway restart.
CLI updates bypass the handoff path and call runGatewayUpdate directly with
the correct cwd, which is why they succeeded while Dashboard updates failed.
Changes:
- update-managed-service-handoff.ts: move root to the first candidate in
resolveManagedServiceHandoffCwd so the handoff runs in the package root.
- update-managed-service-handoff.test.ts: update test to assert cwd matches
the provided root instead of os.homedir().
Fixes #878891 parent 5871d11 commit 973c740
2 files changed
Lines changed: 6 additions & 4 deletions
File tree
- src/gateway/server-methods
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | | - | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | | - | |
175 | | - | |
| 176 | + | |
| 177 | + | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
0 commit comments