fix: exit loop as soon as command is found (#550)
This commit is contained in:
@@ -98,7 +98,6 @@ func is_valid() -> bool:
|
|||||||
#
|
#
|
||||||
# *Returns* True if the command exists, else false.
|
# *Returns* True if the command exists, else false.
|
||||||
func command_exists() -> bool:
|
func command_exists() -> bool:
|
||||||
var command_found = false
|
|
||||||
for base_path in escoria.project_settings_manager.get_setting(
|
for base_path in escoria.project_settings_manager.get_setting(
|
||||||
escoria.project_settings_manager.COMMAND_DIRECTORIES
|
escoria.project_settings_manager.COMMAND_DIRECTORIES
|
||||||
):
|
):
|
||||||
@@ -107,8 +106,8 @@ func command_exists() -> bool:
|
|||||||
self.name
|
self.name
|
||||||
]
|
]
|
||||||
if ResourceLoader.exists(command_path):
|
if ResourceLoader.exists(command_path):
|
||||||
command_found = true
|
return true
|
||||||
return command_found
|
return false
|
||||||
|
|
||||||
|
|
||||||
# Run this command
|
# Run this command
|
||||||
|
|||||||
Reference in New Issue
Block a user