fix: preserve --host flag across update and restart (#972)
This commit is contained in:
@@ -130,6 +130,17 @@ export const registerOpenChamberRoutes = (app, dependencies) => {
|
||||
];
|
||||
let restartCmdPrimary = restartParts.join(' ');
|
||||
let restartCmdFallback = `openchamber serve --port ${storedOptions.port}`;
|
||||
if (storedOptions.host) {
|
||||
if (isWindows) {
|
||||
const escapedHost = storedOptions.host.replace(/"/g, '""');
|
||||
restartCmdPrimary += ` --host "${escapedHost}"`;
|
||||
restartCmdFallback += ` --host "${escapedHost}"`;
|
||||
} else {
|
||||
const escapedHost = storedOptions.host.replace(/'/g, "'\\''");
|
||||
restartCmdPrimary += ` --host '${escapedHost}'`;
|
||||
restartCmdFallback += ` --host '${escapedHost}'`;
|
||||
}
|
||||
}
|
||||
if (storedOptions.uiPassword) {
|
||||
if (isWindows) {
|
||||
const escapedPw = storedOptions.uiPassword.replace(/"/g, '""');
|
||||
|
||||
Reference in New Issue
Block a user