Skip to content

Commit fbaec97

Browse files
anulmanMarshallOfSound
authored andcommitted
refactor(utils): filter packages' os declarations to exclude blacklist entries
1 parent 556deaa commit fbaec97

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/check-supported-platforms.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
export function checkSupportedPlatforms(pkg) {
2-
return require(`${pkg}/package.json`).os || [];
2+
const osList = require(`${pkg}/package.json`).os || [];
3+
4+
return osList.filter(os => !os.startsWith('!'));
35
}
46

57
export default checkSupportedPlatforms;

0 commit comments

Comments
 (0)