diff --git a/src/Terminal/commands/mv.ts b/src/Terminal/commands/mv.ts index 9276f4bdb..3d31894a5 100644 --- a/src/Terminal/commands/mv.ts +++ b/src/Terminal/commands/mv.ts @@ -66,6 +66,13 @@ export function mv( if (destFile != null) { // Already exists, will be overwritten, so we'll delete it + + // Command doesnt work if script is running + if (server.isRunning(destPath)) { + terminal.error(`Cannot use 'mv' on a script that is running`); + return; + } + const status = server.removeFile(destPath); if (!status.res) { terminal.error(`Something went wrong...please contact game dev (probably a bug)`);