Fix "st2-pack-install" script so the setup virtualenv step also works
correctly if user passes in a version (e.g. st2-pack-instal bitcon=0.1.0).
@@ -106,6 +106,8 @@ def main(argv):
result = download_pack(pack=pack, verify_ssl=verify_ssl, force=force,
proxy_config=proxy_config, force_permissions=True)
+ # Raw pack name excluding the version
+ pack_name = result[1]
success = result[2][0]
if success:
@@ -116,8 +118,8 @@ def main(argv):
sys.exit(2)
# 2. Setup pack virtual environment
- LOG.info('Setting up virtualenv for pack "%s"' % (pack))
- setup_pack_virtualenv(pack_name=pack, update=False, logger=LOG,
+ LOG.info('Setting up virtualenv for pack "%s"' % (pack_name))
+ setup_pack_virtualenv(pack_name=pack_name, update=False, logger=LOG,
proxy_config=proxy_config, use_python3=False,
no_download=True)
LOG.info('Successfuly set up virtualenv for pack "%s"' % (pack))
