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
7d7a88cd
Unverified
Commit
7d7a88cd
authored
Oct 16, 2018
by
Sébastien Eustace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix permissions for configurations files
parent
aeb69791
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
CHANGELOG.md
+1
-0
poetry/config.py
+8
-5
tests/test_config.py
+12
-0
No files found.
CHANGELOG.md
View file @
7d7a88cd
...
...
@@ -28,6 +28,7 @@
-
Fixed duplicate entries in both sdist and wheel.
-
Fixed excluded files appearing in the
`package_data`
of the generated
`setup.py`
.
-
Fixed transitive directory dependencies installation.
-
Fixed file permissions for configuration and authentication files.
## [0.11.5] - 2018-09-04
...
...
poetry/config.py
View file @
7d7a88cd
...
...
@@ -93,11 +93,14 @@ class Config:
if
current_mode
!=
384
:
os
.
remove
(
str
(
self
.
_file
))
umask_original
=
os
.
umask
(
umask
)
try
:
fd
=
os
.
open
(
str
(
self
.
_file
),
os
.
O_WRONLY
|
os
.
O_CREAT
,
mode
)
finally
:
os
.
umask
(
umask_original
)
if
self
.
_file
.
exists
():
fd
=
str
(
self
.
_file
)
else
:
umask_original
=
os
.
umask
(
umask
)
try
:
fd
=
os
.
open
(
str
(
self
.
_file
),
os
.
O_WRONLY
|
os
.
O_CREAT
,
mode
)
finally
:
os
.
umask
(
umask_original
)
with
io
.
open
(
fd
,
"w"
,
encoding
=
"utf-8"
)
as
f
:
f
.
write
(
self
.
_content
.
as_string
())
...
...
tests/test_config.py
View file @
7d7a88cd
...
...
@@ -24,3 +24,15 @@ def test_config_sets_the_proper_file_permissions(config):
mode
=
oct
(
os
.
stat
(
str
(
config
.
file
))
.
st_mode
&
0
o777
)
assert
int
(
mode
,
8
)
==
384
def
test_config_add_property
(
config
):
config
.
add_property
(
"settings.virtualenvs.create"
,
True
)
content
=
config
.
file
.
read
()
assert
content
==
{
"settings"
:
{
"virtualenvs"
:
{
"create"
:
True
}}}
config
.
remove_property
(
"settings.virtualenvs.create"
)
content
=
config
.
file
.
read
()
assert
content
==
{
"settings"
:
{
"virtualenvs"
:
{}}}
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