Skip to content

Commit d2bc206

Browse files
committed
fix: 🐛 Fix endless loop when no configuration file exists.
1 parent cf8238e commit d2bc206

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/skwid/src/services/configuration.service.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { inject, injectable } from 'inversify';
2+
23
import { InjectionTokens } from '../configuration/injection-tokens.enum';
34
import { SkwidConfiguration } from '../models/configuration/skwid-configuration.model';
45
import { FileSystemService } from '../models/node/file-system.service';
@@ -35,7 +36,7 @@ export class ConfigurationService {
3536

3637
private resolveConfigFilePath(): string {
3738
let possiblePath = process.cwd();
38-
while (possiblePath) {
39+
while (possiblePath && possiblePath !== '/') {
3940
let configPath = this._pathService.join(possiblePath, 'skwid.yaml');
4041
if (this._fileSystem.existsSync(configPath)) {
4142
return configPath;

0 commit comments

Comments
 (0)