Skip to content

Commit

Permalink
app/launcher: remove import_sync() used only once
Browse files Browse the repository at this point in the history
  • Loading branch information
amezin committed Feb 19, 2024
1 parent 282d51d commit 24ce0a4
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions bin/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,13 @@ function resolve_sync(promise) {
}

const this_file_uri = GLib.filename_to_uri(this_file, null);

function import_sync(uri) {
const resolved_uri =
GLib.Uri.resolve_relative(this_file_uri, uri, GLib.UriFlags.NONE);

return resolve_sync(import(resolved_uri));
}
const app_module_uri =
GLib.Uri.resolve_relative(this_file_uri, '../ddterm/app/application.js', GLib.UriFlags.NONE);

let app_module;

try {
app_module = import_sync('../ddterm/app/application.js');
app_module = resolve_sync(import(app_module_uri));
} catch (ex) {
if (ex.name === 'MissingDependenciesError')
System.exit(1);
Expand Down

0 comments on commit 24ce0a4

Please sign in to comment.