Commit Graph

25 Commits (ca72c38b057d85b4391593289701078aac7e85ed)

Author SHA1 Message Date
Matthias Clasen 69717707fe Nonworking wayland socket forwarding 2015-01-17 00:36:29 -05:00
Alexander Larsson 79a9753b96 Merge pull request #15 from matthiasclasen/error-handling
Some error handling fixes for the run command. I just tried to put
2015-01-15 09:14:05 +01:00
Alexander Larsson c453f1643b Merge pull request #12 from matthiasclasen/usage-error
Avoid many copies of usage_error function
2015-01-15 09:12:49 +01:00
Matthias Clasen 418ba95ef9 Trivial spelling fix 2015-01-14 22:41:56 -05:00
Matthias Clasen dac709ef1d Handle exec error correctly
exec(1) states that exec will only return in case of an error,
and the return value is -1. Therefore, if (!execv(...)) doesn't
make sense.
2015-01-14 22:37:54 -05:00
Matthias Clasen 77a3259083 Don't ignore lack of command key
We were ignoring the error if command is missing or defective,
and could end up in a situation where neither opt_command nor
default_command are set, causing us to pass NULL into execve
for an unexpected shell. Fix that.
2015-01-14 22:16:56 -05:00
Matthias Clasen 85288750e6 Prevent an error pileup
Unfortunately, g_key_file_get_string can set error and still
return non-NULL (e.g if the value contains unsupported escape
sequences).
2015-01-14 22:11:19 -05:00
Matthias Clasen e295608165 Avoid many copies of usage_error function
No need to have the identical static function in every
builtin command.
2015-01-14 18:49:34 -05:00
Matthias Clasen e237b3525e Improve --branch help text for the run comment
This was clearly a copy-paste error.
2015-01-14 18:26:11 -05:00
Matthias Clasen 1a8e40657a Add an argument name to --arch and similar options
This makes the help text more accurate, and helpful.
2015-01-14 00:47:59 -05:00
Matthias Clasen 64fc43101d run: don't print error with for --help
This follows what all the other builtins do: first parse the
commandline, then error out if we got too few arguments.
2015-01-13 19:54:19 -05:00
Alexander Larsson ab27b589f0 run: Fix possible free of static string 2015-01-13 13:06:37 +01:00
Alexander Larsson 038342cec5 Use the new gs_unref_keyfile define 2015-01-12 15:31:48 +01:00
Alexander Larsson 721abb5375 Set a few standard env vars when running apps
This sets PATH, and XDG_DATA_DIRS, and unsets any LD_LIBRARY_PATH
from the host env.
2015-01-12 08:50:09 +01:00
Alexander Larsson 5747018d6e Add build builtin 2015-01-12 08:50:09 +01:00
Alexander Larsson 77d15d7ab0 Move some run setup code into helpers
This moves the specialized code for things like X11/dbus/pulse to
separate helpers.
2015-01-12 08:50:09 +01:00
Alexander Larsson 734ca13f82 Add and use xdg_app_find_deploy_dir_for_ref helper 2015-01-12 08:50:09 +01:00
Alexander Larsson 671a4e35cf Fix pulseaudio socket detection 2014-12-18 22:11:38 +01:00
Alexander Larsson 0420b396fc run: Properly handle arguments after app name 2014-12-18 21:49:49 +01:00
Alexander Larsson a43cf612ba run: Support --devel 2014-12-18 20:53:35 +01:00
Alexander Larsson 5a8e9617db run: Add default command support 2014-12-18 20:45:55 +01:00
Alexander Larsson c4b880f65e run: Don't clear environment 2014-12-18 20:33:55 +01:00
Alexander Larsson 234cbcc620 run: Add dbus support 2014-12-18 20:33:41 +01:00
Alexander Larsson 85cf38e19e run: Add various sharing options and X11 support 2014-12-18 18:48:33 +01:00
Alexander Larsson 13261318e0 Add initial version of run command 2014-12-18 17:51:37 +01:00