Commit graph

93 commits

Author SHA1 Message Date
Josue-T
d03cdb4e95
Merge branch 'stretch-unstable' into hook_return 2018-09-03 12:43:18 +02:00
Alexandre Aubin
64204e41da
Run hook_exec as root by default (#522) 2018-09-03 02:38:02 +02:00
Josué Tille
8ec6f2b81a Fix error if hook return nothing 2018-08-30 17:49:08 +02:00
Josué Tille
e4e981c0fe Change struct returned by hook_callback 2018-08-29 20:56:36 +02:00
Josué Tille
29bf70c57c Add hook name in return structure in hook_callback 2018-08-29 19:02:30 +02:00
Josué Tille
b7554dec21 Use json for return 2018-08-29 18:45:48 +02:00
Josué Tille
70d0f8a68f Add return value in hook_exec 2018-08-29 18:44:45 +02:00
Alexandre Aubin
f7563b2cb4
Merge branch 'stretch-unstable' into app-stdinfo 2018-08-22 18:42:23 +02:00
Laurent Peuch
f35e3ef055 [enh] can run the action of an app 2018-06-22 04:47:32 +02:00
Laurent Peuch
274a219fdc [enh] allow hook_exec to have custom callbacks 2018-06-22 04:37:08 +02:00
ljf
8e8d8e54ab [enh] Enable ynh_info by default 2018-06-11 11:56:54 +02:00
Alexandre Aubin
91483f3896 Reflag some messages as info or debug 2018-06-01 21:52:19 +00:00
Alexandre Aubin
b8d8f72e36 [enh] Add an optional stdinfo output for stuff ran with hook_exec 2017-10-29 23:19:52 +01:00
Laurent Peuch
83971afb9c [mod] pep8 on hooks.py 2017-08-20 21:19:04 +02:00
Laurent Peuch
baf0d098f5 [mod] explicitely import previously globals magic variables 2017-07-25 21:32:20 +02:00
ljf (zamentur)
afe28470c0 [enh] Add execution dir in env on hook exec (#293)
* [enh] Add execution dir in env on hook exec
* [enh] YNH_EXECUTION_DIR become YNH_CWD
* [fix] Hook exec with no env fail
* [enh] Remove dead condition
2017-05-03 19:11:01 +02:00
Laurent Peuch
76a7a36c62 [enh] run hooks as root 2017-03-05 16:41:53 +01:00
Laurent Peuch
0122cbd432 [mod] remove unused import 2017-03-05 16:41:02 +01:00
Laurent Peuch
33e101b588 [mod] change behavior, admin by default, as to explicitly set root as user 2017-03-05 16:41:02 +01:00
Laurent Peuch
b0730d8463 [enh] defaulting running hook_exec as root 2017-03-05 16:41:02 +01:00
Laurent Peuch
f6c7702dfa [mod] rename all global variables to uppercase 2017-02-12 03:34:15 +01:00
Laurent Peuch
110d481cd1 [mod] remove unused imports 2016-12-03 12:00:55 +01:00
Laurent Peuch
365f7694a9 [enh] display file path on file_not_exist error 2016-06-23 18:36:21 +02:00
Jérôme Lebleu
b756f4d1eb [fix] Escape arguments and env values in hook_exec (bugfix #377) 2016-05-30 12:10:39 +02:00
Jérôme Lebleu
048ed3b0ea [fix] Raise proper MoulinetteError exception in hook_exec 2016-05-29 23:38:35 +02:00
Jérôme Lebleu
f09ab43eb8 [fix] Print string error of MoulinetteError in hook_callback 2016-05-21 21:21:20 +02:00
Jérôme Lebleu
c3fd005027 [enh] Allow to set env var for executed hooks in hooks_callback 2016-04-30 17:15:17 +02:00
Jérôme Lebleu
aae59b1d6e [enh] Small changes to env prepending in hook_exec 2016-04-28 21:03:22 +02:00
Julien Malik
c5d1ef981b [enh] Set env var for each app script and rename app variables 2016-04-28 21:03:17 +02:00
Julien Malik
7ce7d6fc15 [enh] Support passing env var to hook_exec 2016-04-28 20:43:22 +02:00
Jérôme Lebleu
3ed502894c [fix] Skip hidden and temp files in hook_list 2016-04-10 19:20:40 +02:00
Jérôme Lebleu
a26d921c0c [fix] Formatting 'args' in hook_callback is useless 2016-04-10 16:50:39 +02:00
Jérôme Lebleu
cf077a50aa [enh] Add pre/post script execution callbacks to hook_callback 2016-04-10 16:48:46 +02:00
Jérôme Lebleu
de08c14aa1 [enh] Allow to set script execution directory in hook_exec 2016-03-28 21:49:11 +02:00
opi
4cabb2f7f9 [enh] Use named arguments with m18n. 2016-03-27 15:56:41 +02:00
opi
7999293438 [enh] Display hook path on error message. 2016-03-27 11:26:41 +02:00
Jérôme Lebleu
94ce22f9d5 [enh] Pass app id to scripts and remove hook_check action
It passes the current app id to the app install/upgrade/remove scripts
as the last argument (wip #126).
The hook category has also been revisited to move some app specific parts
away from there. The action hook_check has been removed accordingly.
2015-12-27 22:56:04 +01:00
Jérôme Lebleu
4d439217f1 [fix] Log real exception string error in hook_callback 2015-11-15 18:33:02 +01:00
Jérôme Lebleu
eaef922d4e [enh] Make use of call_async_output in hook_exec to get output in real time 2015-11-15 15:22:34 +01:00
Jérôme Lebleu
3f42d12e95 [fix] Do not modify handlers with root_handlers in bin/yunohost 2015-11-15 14:58:35 +01:00
Jérôme Lebleu
e14674af88 [enh] Split stdout/stderr wrapping in hook_exec and add a no_trace option 2015-11-14 23:13:51 +01:00
Jérôme Lebleu
b7d0e977b9 [enh] Update hook.py to use logging instead of msignals.display 2015-11-14 18:21:36 +01:00
Jérôme Lebleu
908d77f234 [ref] Rename lib folder to src 2015-10-08 15:47:24 +02:00
Renamed from lib/yunohost/hook.py (Browse further)