Skip to content

Commit

Permalink
chore: fix #189
Browse files Browse the repository at this point in the history
  • Loading branch information
iamogbz committed Aug 31, 2023
1 parent 8909b3d commit febfbb4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 9 additions & 2 deletions setup.py
@@ -1,5 +1,6 @@
"""Setup project file"""
import os
import sys
from datetime import datetime
from typing import (
Iterator,
Expand All @@ -9,8 +10,14 @@

from setuptools import setup

from src.nvshim import __version__ as PACKAGE_VERSION
from src.nvshim.utils.constants import SHIMS as shims
# include nvshim src folder
sys.path.append("./src")

try:
from nvshim import __version__ as PACKAGE_VERSION
from nvshim.utils.constants import SHIMS as shims
finally:
pass


def readme() -> str:
Expand Down
5 changes: 3 additions & 2 deletions src/nvshim/core/__main__.py
Expand Up @@ -238,7 +238,8 @@ def match_version(
version_sorted = sorted(
vi
for vi in (semver.VersionInfo.parse(v) for v in version_set)
if version.major == vi.major
if version
and version.major == vi.major
and (is_minor_wildcard or version.minor == vi.minor)
and (is_patch_wildcard or version.patch == vi.patch)
)
Expand Down Expand Up @@ -401,7 +402,7 @@ def get_bin_path(
if not installed_version:
message.print_version_not_installed(version_alias, version)
sys.exit(ErrorCode.VERSION_NOT_INSTALLED)
version = installed_version
version = str(installed_version)

node_path = get_node_version_bin_dir(node_versions_dir, version=version)
bin_path = os.path.join(node_path, bin_file)
Expand Down

0 comments on commit febfbb4

Please sign in to comment.