Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

How to abort a dart build process from a custom build script?

I'm unable to exit the build process programmatically when I decide that some of the build conditions are not met to perform a build.

I've tried

throw StateError("Universe collapsed, can not continue");
exit(1);

within my custom build script (inside the Future build(BuildStep buildStep) method), but the build just keeps on going.

How do I say, "just stop building, you won't get anywhere"?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...