陶泥儿 H5 打包拒绝非普通文件条目
- collectZipEntries 遇到 FIFO/socket/设备文件时抛错,不再静默跳过导致缺文件的包
This commit is contained in:
+3
-1
@@ -125,8 +125,10 @@ function collectZipEntries(rootDir, rootName) {
|
||||
visit(full);
|
||||
} else if (st.isFile()) {
|
||||
entries.push({ name: nameInZip, dir: false, full });
|
||||
} else {
|
||||
// FIFO / socket / 设备文件既不是目录也不是普通文件;静默跳过会打出一个缺文件的包。
|
||||
throw new Error(`产物目录含非普通文件条目:${full};请清理后再打包`);
|
||||
}
|
||||
// 符号链接已在 assertNoSymlinks 拒绝,这里不会遇到。
|
||||
}
|
||||
};
|
||||
visit(rootDir);
|
||||
|
||||
Reference in New Issue
Block a user