Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
770a8148
Commit
770a8148
authored
Sep 19, 2022
by
Brian Marroquin
Committed by
Bjorn Neergaard
Oct 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds fallback behavior for non-ms shells
parent
04184247
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/poetry/utils/shell.py
+13
-3
No files found.
src/poetry/utils/shell.py
View file @
770a8148
...
@@ -78,12 +78,22 @@ class Shell:
...
@@ -78,12 +78,22 @@ class Shell:
if
sys
.
platform
==
"win32"
:
if
sys
.
platform
==
"win32"
:
if
self
.
_name
in
(
"powershell"
,
"pwsh"
):
if
self
.
_name
in
(
"powershell"
,
"pwsh"
):
args
=
[
"-NoExit"
,
"-File"
,
str
(
activate_path
)]
args
=
[
"-NoExit"
,
"-File"
,
str
(
activate_path
)]
el
se
:
el
if
self
.
_name
==
"cmd"
:
# /K will execute the bat file and
# /K will execute the bat file and
# keep the cmd process from terminating
# keep the cmd process from terminating
args
=
[
"/K"
,
str
(
activate_path
)]
args
=
[
"/K"
,
str
(
activate_path
)]
completed_proc
=
subprocess
.
run
([
self
.
path
,
*
args
])
else
:
return
completed_proc
.
returncode
args
=
None
if
args
:
completed_proc
=
subprocess
.
run
([
self
.
path
,
*
args
])
return
completed_proc
.
returncode
else
:
# If no args are set, execute the shell within the venv
# This activates it, but there could be some features missing:
# deactivate command might not work
# shell prompt will not be modified.
return
env
.
execute
(
self
.
_path
)
import
shlex
import
shlex
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment