Skip to content

Commit

Permalink
away install last version of ntk when access exe
Browse files Browse the repository at this point in the history
  • Loading branch information
reloadsweety committed Feb 13, 2025
1 parent e49de8b commit 4b86001
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,4 @@ dmypy.json
cython_debug/

build/*
.history/*
Binary file modified dist/ntk.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion ntk/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


def auto_install_and_generate_ntk_command():
subprocess.run(['python', '-m', 'pip', 'install', 'next-theme-kit'])
subprocess.run(['python', '-m', 'pip', 'install', 'next-theme-kit', "--upgrade"])

# Set up a command alias: 'ntk' will execute 'python -m ntk' with any passed arguments
os.system("doskey ntk=python -m ntk $*")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_auto_install_and_generate_ntk_command_should_call_subprocess_and_os_cor
with patch("subprocess.run") as mock_subprocess, patch("os.system") as mock_os:
auto_install_and_generate_ntk_command()

mock_subprocess.assert_called_with(['python', '-m', 'pip', 'install', 'next-theme-kit'])
mock_subprocess.assert_called_with(['python', '-m', 'pip', 'install', 'next-theme-kit', "--upgrade"])

mock_os.assert_any_call("doskey ntk=python -m ntk $*")

Expand Down

0 comments on commit 4b86001

Please sign in to comment.