Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: gulp file read endless waiting #7826

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { existsSync } from 'fs';
import { dirname, join, resolve } from 'path';
import { dirname, join, parse, resolve } from 'path';

export interface BuildConfig {
projectVersion: string;
Expand All @@ -22,6 +22,11 @@ export function findBuildConfig(): string {
let currentDir = process.cwd();

while (!existsSync(resolve(currentDir, BUILD_CONFIG_FILENAME))) {
if (currentDir === parse(process.cwd()).root) {
console.error(`Can not find ${BUILD_CONFIG_FILENAME}`);
break;
}

currentDir = dirname(currentDir);
}

Expand Down