@@ -31,7 +31,7 @@ export async function main([action, ...args]) {
3131
3232 if ( action === "ci" ) {
3333 const filenames = args ;
34- const success = await ci ( { filenames, current_dir } ) ;
34+ const success = await ci ( { filenames } ) ;
3535 return success ? 0 : 1 ;
3636 }
3737
@@ -43,12 +43,10 @@ export async function main([action, ...args]) {
4343 }
4444
4545 if ( lang . id === "vala" ) {
46- const api_file = (
47- GLib . getenv ( "FLATPAK_ID" )
48- ? Gio . File . new_for_path ( pkg . pkgdatadir )
49- : current_dir . resolve_relative_path ( "src/langs/vala" )
50- ) . get_child ( "workbench.vala" ) ;
51- api_file . copy (
46+ const file_api = Gio . File . new_for_path ( pkg . pkgdatadir ) . get_child (
47+ "workbench.vala" ,
48+ ) ;
49+ file_api . copy (
5250 current_dir . get_child ( "workbench.vala" ) ,
5351 Gio . FileCopyFlags . OVERWRITE ,
5452 null ,
@@ -122,7 +120,7 @@ async function checkFile({ lspc, file, lang, uri }) {
122120 }
123121}
124122
125- async function ci ( { filenames, current_dir } ) {
123+ async function ci ( { filenames } ) {
126124 for ( const filename of filenames ) {
127125 const demo_dir = Gio . File . new_for_path ( filename ) ;
128126
@@ -354,12 +352,10 @@ async function ci({ filenames, current_dir }) {
354352 const languageId = "vala" ;
355353 let version = 0 ;
356354
357- const api_file = (
358- GLib . getenv ( "FLATPAK_ID" )
359- ? Gio . File . new_for_path ( `/app/share/${ GLib . getenv ( "FLATPAK_ID" ) } ` )
360- : current_dir . resolve_relative_path ( "src/langs/vala" )
361- ) . get_child ( "workbench.vala" ) ;
362- api_file . copy (
355+ const file_api = Gio . File . new_for_path ( pkg . pkgdatadir ) . get_child (
356+ "workbench.vala" ,
357+ ) ;
358+ file_api . copy (
363359 demo_dir . get_child ( "workbench.vala" ) ,
364360 Gio . FileCopyFlags . OVERWRITE ,
365361 null ,
0 commit comments