Closed maltevesper closed 1 year ago
fixes #49 (Turns the stackoverflow into a debugtrace), output after fix:
Bad state: Can not find project root
#0 Cider._findRoot
cider.dart:35
#1 new Cider.<anonymous closure>
cider.dart:20
#2 Singleton.call
singleton.dart:11
#3 ContainerMixin.get
container.dart:28
#4 PubspecService.install.<anonymous closure>
pubspec_service.dart:28
#5 Singleton.call
singleton.dart:11
#6 ContainerMixin.get
container.dart:28
#7 PubspecService.install.<anonymous closure>
pubspec_service.dart:35
#8 Cider.run
cider.dart:72
<asynchronous suspension>
#9 main
cider.dart:6
<asynchronous suspension>
Thank you! Would it be possible to add a test case for this?
@f3ath you move to quickly... (But hey accepted pull requests are nice) I had a go at adding a test case, and rebased the branch so that one could do a before and after (I.e. first commit is the test which fails on the old code, second commit is the fix).
Going to make a new pr for the test.
On Linux I experienced the findroot function looping for ever and not aborting upon reaching the filesystem root. The following patch is an attempt to fix this.