If Yarn can't find the new Sass version immediately, wait 10 seconds

This commit is contained in:
Natalie Weizenbaum 2021-01-11 16:44:51 -08:00
parent ec8cfb32f9
commit f3bd9103ed

View File

@ -24,7 +24,15 @@ Future<void> updateBazel() async {
.readAsStringSync()
.replaceFirst(RegExp(r'"sass": "[^"]+"'), '"sass": "${pkg.version}"'));
run("yarn", workingDirectory: p.join(repo, "sass"));
try {
run("yarn", workingDirectory: p.join(repo, "sass"));
} on ProcessException catch (error) {
if (error.stderr.contains("Couldn't find any versions for \"sass\"")) {
log("The new sass version doesn't seem to be available yet, waiting 10s...");
await Future.delayed(Duration(seconds: 10));
run("yarn", workingDirectory: p.join(repo, "sass"));
}
}
run("git",
arguments: [