@myvillage/cli 1.88.1 → 1.88.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/package.json
CHANGED
|
@@ -171,9 +171,12 @@ async function resolveMachineIdentity(opts) {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
if (saved?.machineKey) {
|
|
174
|
-
// Re-register with the stored credential so
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
// Re-register with the stored credential so metadata/version refresh. Keep
|
|
175
|
+
// the name this machine already goes by unless a new one was asked for —
|
|
176
|
+
// restarting the runner must not rename the machine out from under the user.
|
|
177
|
+
const name = opts.name || saved.name || os.hostname();
|
|
178
|
+
const { machineId } = await register(makeClient(saved.machineKey, null), { ...opts, name });
|
|
179
|
+
persistRunnerState({ ...saved, machineId, name, registeredAt: new Date().toISOString() });
|
|
177
180
|
return { machineId, machineKey: saved.machineKey };
|
|
178
181
|
}
|
|
179
182
|
|