improve license command with cache and local path
This commit is contained in:
parent
3165c440e3
commit
905714adfe
|
@ -419,8 +419,11 @@ class CommandProcessor(metaclass=CommandMeta):
|
||||||
|
|
||||||
def _cmd_license(self):
|
def _cmd_license(self):
|
||||||
"""Returns the licensing information"""
|
"""Returns the licensing information"""
|
||||||
with open("LICENSE") as f:
|
license = getattr(CommandProcessor, "license", None)
|
||||||
self.output(f.read())
|
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):
|
def default(self, raw: str):
|
||||||
self.output("Echo: " + raw)
|
self.output("Echo: " + raw)
|
||||||
|
|
Loading…
Reference in New Issue