From c8aa935b383c8ab8dc3e71204b7ac6c4362ee54e Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Mon, 11 Sep 2017 03:54:48 +0800 Subject: [PATCH] Use os.path.isabs to detect absolute path commands This is more canonical than testing for the '/' prefix on POSIX, and actually works on Windows. --- pipenv/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 6bd00bf7..abfa6900 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -1298,7 +1298,7 @@ def run(command, args, three=None, python=False, system=False): ensure_project(three=three, python=python, validate=False) _which = 'which' if not os.name == 'nt' else 'where' - if command.startswith(os.sep): + if os.path.isabs(command): system = True command_path = which(command) if not system else command