command/install: fixes the bug that `cortex install xxx --save` fail to build recursively; fixes #320