mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
improve license command with cache and local path
This commit is contained in:
@@ -419,8 +419,11 @@ class CommandProcessor(metaclass=CommandMeta):
|
||||
|
||||
def _cmd_license(self):
|
||||
"""Returns the licensing information"""
|
||||
with open("LICENSE") as f:
|
||||
self.output(f.read())
|
||||
license = getattr(CommandProcessor, "license", None)
|
||||
if not license:
|
||||
with open(Utils.local_path("LICENSE")) as f:
|
||||
CommandProcessor.license = license = f.read()
|
||||
self.output(CommandProcessor.license)
|
||||
|
||||
def default(self, raw: str):
|
||||
self.output("Echo: " + raw)
|
||||
|
Reference in New Issue
Block a user