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
2cf5ee1c
Unverified
Commit
2cf5ee1c
authored
Oct 17, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAke get-poetry work for non-interactive shells
parent
6ef523bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
get-poetry.py
+13
-6
No files found.
get-poetry.py
View file @
2cf5ee1c
...
...
@@ -131,6 +131,16 @@ def is_decorated():
return
False
def
is_interactive
():
if
not
hasattr
(
sys
.
stdin
,
"fileno"
):
return
False
try
:
return
os
.
isatty
(
sys
.
stdin
.
fileno
())
except
UnsupportedOperation
:
return
False
def
colorize
(
style
,
text
):
if
not
is_decorated
():
return
text
...
...
@@ -644,11 +654,6 @@ class Installer:
def
set_windows_path_var
(
self
,
value
):
import
ctypes
from
ctypes.wintypes
import
HWND
from
ctypes.wintypes
import
LPARAM
from
ctypes.wintypes
import
LPVOID
from
ctypes.wintypes
import
UINT
from
ctypes.wintypes
import
WPARAM
with
winreg
.
ConnectRegistry
(
None
,
winreg
.
HKEY_CURRENT_USER
)
as
root
:
with
winreg
.
OpenKey
(
root
,
"Environment"
,
0
,
winreg
.
KEY_ALL_ACCESS
)
as
key
:
...
...
@@ -817,7 +822,9 @@ def main():
version
=
args
.
version
or
os
.
getenv
(
"POETRY_VERSION"
),
preview
=
args
.
preview
or
string_to_bool
(
os
.
getenv
(
"POETRY_PREVIEW"
,
"0"
)),
force
=
args
.
force
,
accept_all
=
args
.
accept_all
or
string_to_bool
(
os
.
getenv
(
"POETRY_ACCEPT"
,
"0"
)),
accept_all
=
args
.
accept_all
or
string_to_bool
(
os
.
getenv
(
"POETRY_ACCEPT"
,
"0"
))
or
not
is_interactive
(),
)
if
args
.
uninstall
or
string_to_bool
(
os
.
getenv
(
"POETRY_UNINSTALL"
,
"0"
)):
...
...
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