mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
COMMAND: Improving error message for mv when a script is Running
* Adjusted error message to include information about making sure scripts are not running when trying to use mv on them. * nom run format * Added behaviour info to NetscriptDefinitions.d.ts * `npm run doc` * un-nested/inversed the check * `npm run format`
This commit is contained in:
committed by
GitHub
parent
ff106bb764
commit
8f69a6c0ee
@@ -27,7 +27,9 @@ export function mv(args: (string | number | boolean)[], server: BaseServer): voi
|
||||
if (!sourceContentFile) return Terminal.error(`Source file ${sourcePath} does not exist`);
|
||||
|
||||
if (!sourceContentFile.deleteFromServer(server)) {
|
||||
return Terminal.error(`Could not remove source file ${sourcePath} from existing location.`);
|
||||
return Terminal.error(
|
||||
`Could not remove source file ${sourcePath} from existing location. If ${sourcePath} is a script, make sure that it is NOT running before trying to use 'mv' on it.`,
|
||||
);
|
||||
}
|
||||
Terminal.print(`Moved ${sourcePath} to ${destinationPath}`);
|
||||
const { overwritten } = server.writeToContentFile(destinationPath, sourceContentFile.content);
|
||||
|
||||
Reference in New Issue
Block a user