Skip to content

Commit c156eaa

Browse files
committed
Fix bug when no --exclude is used
1 parent cef4992 commit c156eaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build-binary-artifact.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def make_zipfile(dirs, manifest, manifest_name, outname, top_level_name, outdir,
145145
for dir in dirs:
146146
f.write(dir, '%s/%s' % (top_level_name, dir))
147147
for root, dirs, files in os.walk(dir):
148+
# print(f'Processing {root} {dirs} {files}')
148149
dirs[:] = [d for d in dirs if d not in exclude]
149150
for file in files:
150151
if exclude is None or file not in exclude:
@@ -314,7 +315,7 @@ class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter,
314315
help="""Don't build the archive; just return the hash of the given dir.""")
315316
parser.add_argument('--validate', action='store_true',
316317
help="""Validate an unpacked archive by checking its hash against the manifest.""")
317-
parser.add_argument('--exclude', action='append',
318+
parser.add_argument('--exclude', action='append', default=[],
318319
help="""Exclude this filename from the archive. May be repeated.""")
319320
parser.add_argument('dir', nargs='+',
320321
help="""dirs to collect into the binary artifact""")

0 commit comments

Comments
 (0)