Skip to content

Commit fd99b17

Browse files
brjspdanielleadams
authored andcommitted
tools: make utils.SearchFiles deterministic
`glob.glob` on Linux returns files in the order returned by the filesystem driver, and the output from this function is stuffed by the Electron build process straight into the `config.gypi` header, causing non-reproducible builds. See this log for an example of the nondeterminism: https://rb.zq1.de/compare.factory-20220901/diffs/nodejs-electron-compare.out PR-URL: #44496 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Stewart X Addison <sxa@redhat.com>
1 parent d762a34 commit fd99b17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@ def SearchFiles(dir, ext):
112112
list = glob.glob(dir+ '/**/*.' + ext, recursive=True)
113113
if sys.platform == 'win32':
114114
list = [ x.replace('\\', '/')for x in list]
115-
return list
115+
return sorted(list)

0 commit comments

Comments
 (0)