mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 08:25:36 +00:00
Merge pull request #2409 from balena-io/drop-unused-dir-traversal-list
Drop unnecessary directory list created during balena deploy & push
This commit is contained in:
commit
8abeb6aed7
@ -206,9 +206,7 @@ export interface FileStats {
|
||||
* @param projectDir Source directory (root of subtree to be listed)
|
||||
*/
|
||||
async function listFiles(projectDir: string): Promise<string[]> {
|
||||
const dirs: string[] = [];
|
||||
const files: string[] = [];
|
||||
dirs.push(projectDir);
|
||||
async function walk(currentDirs: string[]): Promise<string[]> {
|
||||
if (!currentDirs.length) {
|
||||
return files;
|
||||
@ -229,7 +227,6 @@ async function listFiles(projectDir: string): Promise<string[]> {
|
||||
const fpath = path.join(dir, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
foundDirs.push(fpath);
|
||||
dirs.push(fpath);
|
||||
} else {
|
||||
files.push(fpath);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user