mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
@@ -112,4 +112,4 @@ def SearchFiles(dir, ext):
|
||||
list = glob.glob(dir+ '/**/*.' + ext, recursive=True)
|
||||
if sys.platform == 'win32':
|
||||
list = [ x.replace('\\', '/')for x in list]
|
||||
return list
|
||||
return sorted(list)
|
||||
|
||||
Reference in New Issue
Block a user