mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
UI: Show errors if using nano/vim with patterns that do not match any files (#2515)
This commit is contained in:
@@ -46,7 +46,12 @@ export function commonEditor(
|
||||
|
||||
// Glob of existing files
|
||||
if (pattern.includes("*") || pattern.includes("?")) {
|
||||
for (const [path, file] of getGlobbedFileMap(pattern, server, Terminal.currDir)) {
|
||||
const globbedFileMap = getGlobbedFileMap(pattern, server, Terminal.currDir);
|
||||
if (globbedFileMap.size === 0) {
|
||||
Terminal.error(`No files matching ${pattern}`);
|
||||
return;
|
||||
}
|
||||
for (const [path, file] of globbedFileMap) {
|
||||
if (isLegacyScript(path)) {
|
||||
hasLegacyScript = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user