Fix symbolic link regression in push & deploy

Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
This commit is contained in:
Thodoris Greasidis 2021-12-14 00:16:41 +02:00
parent aa286cc0e7
commit 3def4d0e4a

View File

@ -225,7 +225,11 @@ async function listFiles(projectDir: string): Promise<string[]> {
const _files = await fs.readdir(dir, { withFileTypes: true });
for (const entry of _files) {
const fpath = path.join(dir, entry.name);
if (entry.isDirectory()) {
const isDirectory =
entry.isDirectory() ||
(entry.isSymbolicLink() && (await fs.stat(fpath)).isDirectory());
if (isDirectory) {
foundDirs.push(fpath);
} else {
files.push(fpath);