We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f60a796 commit 71a0c4dCopy full SHA for 71a0c4d
genkit-tools/common/src/utils/utils.ts
@@ -60,12 +60,13 @@ export function detectRuntime(directory: string): Runtime {
60
if (fs.existsSync(path.join(directory, 'package.json'))) {
61
return 'node';
62
}
63
- fs.readdirSync(directory).forEach((file) => {
+ const files = fs.readdirSync(directory);
64
+ for (const file of files) {
65
const filePath = path.join(directory, file);
66
const stat = fs.statSync(filePath);
67
if (stat.isFile() && path.extname(file) === '.go') {
68
return 'go';
69
- });
70
+ }
71
return undefined;
72
0 commit comments