Skip to content

Commit b7d43b1

Browse files
committed
fix: path expansion
1 parent 8d1712e commit b7d43b1

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## v3.1.1 (2023-08-27)
4+
5+
- Expand paths for user-supplied strings. This now allows for spaces in paths and proper expansion of home directories (eg: `~`)
6+
37
## v3.1.0 (2023-08-24)
48

59
- Adds `--version` flag

pip_tree/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.1.0'
1+
__version__ = '3.1.1'

pip_tree/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import json
3+
import os
34

45
import pip_tree
56
from pip_tree._version import __version__
@@ -32,7 +33,7 @@ def generate_console_output(self):
3233
"""Take the output of the dependency tree and print to console."""
3334
print('Generating Pip Tree report...')
3435

35-
final_output, package_count = pip_tree.generate_pip_tree(self.path)
36+
final_output, package_count = pip_tree.generate_pip_tree(os.path.expanduser(self.path))
3637
console_output = json.dumps(final_output, indent=4)
3738

3839
print(console_output)

0 commit comments

Comments
 (0)