mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 03:00:56 +02:00
CLI: Add --temporary flag to run command (#2354)
This commit is contained in:
@@ -48,6 +48,7 @@ import { SpecialServers } from "../../Server/data/SpecialServers";
|
||||
import { SnackbarEvents } from "../../ui/React/Snackbar";
|
||||
import { ToastVariant } from "@enums";
|
||||
import { createRunningScriptInstance, startWorkerScript } from "../../NetscriptWorker";
|
||||
import type { PositiveInteger } from "../../types";
|
||||
|
||||
// Extend acorn-walk to support TypeScript nodes.
|
||||
extendAcornWalkForTypeScriptNodes(walk.base);
|
||||
@@ -242,7 +243,12 @@ function Root(props: IProps): React.ReactElement {
|
||||
// Always save before doing anything else.
|
||||
await save();
|
||||
|
||||
const result = createRunningScriptInstance(server, currentScript.path, null, 1, []);
|
||||
const result = createRunningScriptInstance(
|
||||
server,
|
||||
currentScript.path,
|
||||
{ threads: 1 as PositiveInteger, temporary: false, preventDuplicates: false },
|
||||
[],
|
||||
);
|
||||
if (!result.success) {
|
||||
dialogBoxCreate(result.message);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user