Merge branch 'main' of https://gitlab.com/famedly/famedlysdk into yiffed

This commit is contained in:
Inex Code 2020-10-14 21:55:10 +03:00
commit 9759b70bae
2 changed files with 22 additions and 1 deletions

View File

@ -129,3 +129,18 @@ pages:
- public
only:
- main
# Adds license-scanning job. Because Gitlab does not support pub.dev
# we added https://github.com/oss-review-toolkit/ort
include:
- template: Security/License-Scanning.gitlab-ci.yml
license_scanning:
stage: coverage
image:
name: "registry.gitlab.com/gitlab-org/security-products/analyzers/ort/ort:latest"
script:
- /opt/ort/bin/ort analyze -i $CI_PROJECT_DIR -o $CI_PROJECT_DIR/ --allow-dynamic-versions
- /opt/ort/bin/ort scan -i $CI_PROJECT_DIR/analyzer-result.yml -o $CI_PROJECT_DIR/ || true
- /opt/ort/bin/ort report -f GitLabLicenseModel -i $CI_PROJECT_DIR/scan-result.yml -o $CI_PROJECT_DIR/

View File

@ -21,7 +21,13 @@ import 'dart:async';
Future<T> runInBackground<T, U>(
FutureOr<T> Function(U arg) function, U arg) async {
final isolate = await IsolateRunner.spawn();
IsolateRunner isolate;
try {
isolate = await IsolateRunner.spawn();
} on UnsupportedError {
// web does not support isolates (yet), so we fall back to calling the method directly
return await function(arg);
}
try {
return await isolate.run(function, arg);
} finally {