mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Fix package updater
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -1188,7 +1188,7 @@ export default class ControlConnection extends BaseConnection {
|
||||
if (!this._controller.config.get("controller.allow_remote_updates")) {
|
||||
throw new lib.RequestError("Remote updates are disabled on this machine");
|
||||
}
|
||||
return lib.updatePackage("@clusterio/controller");
|
||||
return await lib.updatePackage("@clusterio/controller");
|
||||
}
|
||||
|
||||
async handlePluginUpdateRequest(request: lib.PluginUpdateRequest) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RequestError } from "./errors";
|
||||
import { PluginNodeEnvInfo } from "./plugin";
|
||||
const execAsync = util.promisify(exec);
|
||||
|
||||
async function isDev() {
|
||||
function isDev() {
|
||||
// dev: <devRoot>/packages/lib/dist/src/rce_ops.js
|
||||
// prod: <prodRoot>/node_modules/@clusterio/lib/dist/src/rce_ops.js
|
||||
return __dirname.split(path.sep).at(-5) === "packages"; // opposed to "@clusterio"
|
||||
|
||||
@@ -187,7 +187,7 @@ export function NpmButton(props: { target: lib.AddressShorthand, canRestart?: bo
|
||||
{
|
||||
formAction !== undefined
|
||||
&& account.hasPermission(`core.${props.target === "controller" ? "controller" : "host"}.restart`)
|
||||
&& <Form.Item label="Restart on completion" name="restart">
|
||||
&& <Form.Item label="Restart on completion" name="restart" valuePropName="checked">
|
||||
<Checkbox disabled={props.canRestart === false}/>
|
||||
</Form.Item>
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user