Skip to content

Commit 71a0c4d

Browse files
authored
Fixed incorrect return statement. (#67)
1 parent f60a796 commit 71a0c4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

genkit-tools/common/src/utils/utils.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ export function detectRuntime(directory: string): Runtime {
6060
if (fs.existsSync(path.join(directory, 'package.json'))) {
6161
return 'node';
6262
}
63-
fs.readdirSync(directory).forEach((file) => {
63+
const files = fs.readdirSync(directory);
64+
for (const file of files) {
6465
const filePath = path.join(directory, file);
6566
const stat = fs.statSync(filePath);
6667
if (stat.isFile() && path.extname(file) === '.go') {
6768
return 'go';
6869
}
69-
});
70+
}
7071
return undefined;
7172
}

0 commit comments

Comments
 (0)