Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
docker-py
Commits
7f5739dc
Kaydet (Commit)
7f5739dc
authored
Agu 15, 2017
tarafından
Joffrey F
Kaydeden (comit)
Joffrey F
Agu 17, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Leading slash in .dockerignore should be ignored
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
7139e2d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
build.py
docker/utils/build.py
+1
-0
utils_test.py
tests/unit/utils_test.py
+5
-0
No files found.
docker/utils/build.py
Dosyayı görüntüle @
7f5739dc
...
@@ -26,6 +26,7 @@ def exclude_paths(root, patterns, dockerfile=None):
...
@@ -26,6 +26,7 @@ def exclude_paths(root, patterns, dockerfile=None):
if
dockerfile
is
None
:
if
dockerfile
is
None
:
dockerfile
=
'Dockerfile'
dockerfile
=
'Dockerfile'
patterns
=
[
p
.
lstrip
(
'/'
)
for
p
in
patterns
]
exceptions
=
[
p
for
p
in
patterns
if
p
.
startswith
(
'!'
)]
exceptions
=
[
p
for
p
in
patterns
if
p
.
startswith
(
'!'
)]
include_patterns
=
[
p
[
1
:]
for
p
in
exceptions
]
include_patterns
=
[
p
[
1
:]
for
p
in
exceptions
]
...
...
tests/unit/utils_test.py
Dosyayı görüntüle @
7f5739dc
...
@@ -768,6 +768,11 @@ class ExcludePathsTest(unittest.TestCase):
...
@@ -768,6 +768,11 @@ class ExcludePathsTest(unittest.TestCase):
self
.
all_paths
-
set
([
'foo/a.py'
])
self
.
all_paths
-
set
([
'foo/a.py'
])
)
)
def
test_single_subdir_single_filename_leading_slash
(
self
):
assert
self
.
exclude
([
'/foo/a.py'
])
==
convert_paths
(
self
.
all_paths
-
set
([
'foo/a.py'
])
)
def
test_single_subdir_with_path_traversal
(
self
):
def
test_single_subdir_with_path_traversal
(
self
):
assert
self
.
exclude
([
'foo/whoops/../a.py'
])
==
convert_paths
(
assert
self
.
exclude
([
'foo/whoops/../a.py'
])
==
convert_paths
(
self
.
all_paths
-
set
([
'foo/a.py'
])
self
.
all_paths
-
set
([
'foo/a.py'
])
...
...
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