Skip to content

Commit

Permalink
Allow passing arguments to zypak-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
noonsleeper authored and gasinvein committed Oct 18, 2023
1 parent 019611a commit 188d214
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editor-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function exec_editor() {
export ZYPAK_BIN="@ZYPAK_BINDIR@"
export ZYPAK_LIB="@ZYPAK_LIBDIR@"
export CHROME_WRAPPER="@WRAPPER_PATH@"
exec "@ZYPAK_BINDIR@/zypak-helper" host "@EDITOR_BINARY@" "$@"
exec "@ZYPAK_BINDIR@/zypak-helper" @ZYPAK_ARGS@ "@EDITOR_BINARY@" "$@"
else
exec "@EDITOR_BINARY@" "$@"
fi
Expand Down
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ foreach arg : get_option('editor_args')
editor_args += '"@0@"'.format(arg)
endforeach

zypak_args = []
foreach arg : get_option('zypak_args')
zypak_args += '"@0@"'.format(arg)
endforeach

export_envs = []
foreach env : get_option('envs')
var = env.split('=')
Expand All @@ -62,6 +67,7 @@ wrapper_data = configuration_data({
'WRAPPER_PATH': wrapper_path,
'EDITOR_BINARY': editor_path,
'EDITOR_ARGS': ' '.join(editor_args),
'ZYPAK_ARGS': ' '.join(zypak_args),
'EXPORT_ENVS': ' && '.join(export_envs),
'EXPORT_ENVS_INNER': ' && '.join(export_envs_inner),
'EDITOR_TITLE': get_option('editor_title'),
Expand Down
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ option('first_run_template', type: 'string', value: 'first_run.txt')
option('sdk_update_template', type: 'string', value: 'sdk_update.txt')
option('flagfile_prefix', type: 'string', value: 'flatpak-vscode')
option('zypak', type: 'feature', value: 'disabled')
option('zypak_args', type: 'array', value: ['host'])
option('envs', type: 'array', value: [])
option('envs_inner', type: 'array', value: [])

0 comments on commit 188d214

Please sign in to comment.