X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/44d5da00b520a05cd56e58b3998660f64ea59ebd..af3de081542f66dfb1482dcf2a654b7e1668783c:/action/main.py?ds=inline diff --git a/action/main.py b/action/main.py index cd920f5..03228cb 100644 --- a/action/main.py +++ b/action/main.py @@ -14,9 +14,10 @@ VERSION = os.getenv("INPUT_VERSION", default="") run([sys.executable, "-m", "venv", str(ENV_PATH)], check=True) -req = "black[colorama]" -if VERSION: - req += f"=={VERSION}" +version_specifier = VERSION +if VERSION and VERSION[0] in "0123456789": + version_specifier = f"=={VERSION}" +req = f"black[colorama]{version_specifier}" pip_proc = run( [str(ENV_BIN / "python"), "-m", "pip", "install", req], stdout=PIPE,