Commit Graph

361 Commits

Author SHA1 Message Date
Félix Saparelli 8ffe20d545 [libs] Update other deps 2019-01-26 18:19:57 +13:00
Félix Saparelli 63afc013c9 [libs] Update Notify 2019-01-26 18:02:27 +13:00
Félix Saparelli 578ffa1deb [run] Fix outdated comment in ExecHandler 2019-01-26 17:42:36 +13:00
Félix Saparelli 5846b64020 [run] Further dry the ExecHandler 2019-01-26 17:32:48 +13:00
Félix Saparelli 3dd2f797ab [process] Remove some more unwrap 2019-01-26 17:26:33 +13:00
Félix Saparelli 6a23f77687 [run] Pass ops by reference when possible 2019-01-26 17:20:29 +13:00
Félix Saparelli ede5505a6b [run] Dry spawning the child process 2019-01-26 17:16:07 +13:00
Félix Saparelli 5e44cafb94 [windows] Attempt to use tput to clear the screen
In some situations, this may clear the screen better than a call to
`cls`, and in all other cases `cls` is called anyway.

May help #99
2019-01-26 15:22:09 +13:00
Félix Saparelli 6f473bcd87 [meta] Run formatter 2019-01-26 15:15:27 +13:00
Félix Saparelli 3a6c6b36b2
Merge pull request #105 from watchexec/c-bindings
Library changes for #103, building on #104
2019-01-26 15:09:39 +13:00
Félix Saparelli aae5a216b0 [api] Make watchexec take a Handler rather than a callback
Instead of special-casing the callback, which is the path least-taken,
switch the internals to a Handler model, where the default behaviour is
an implementation of a Handler, and external callers can implement their
own Handlers and pass them in.

While doing so, change all unwraps in run::run to returning Errs, and
expand the watchexec Error enum to accommodate. That should make it
easier to use as a library.

Also, differentiate between "manual" and "on update" runs. For now the
only manual run is the initial run, but this paves the way for e.g.
keyboard- or signal- triggered runs.
2019-01-26 14:45:13 +13:00
Félix Saparelli ac3a4f0717 [pathop] Revert changes adding a time field 2019-01-26 14:40:30 +13:00
Félix Saparelli b49bf74dd6 [meta] Revert .gitignore change 2019-01-26 09:16:43 +13:00
Félix Saparelli 65db0dfae1 [meta] Revert version bump 2019-01-26 09:16:02 +13:00
David Ziegler 7b3daeef9c Major changes for c bindings integration as third party crate (see project: github/InfinityMod/watchexec_c).
Changed version to 1.9.3 for third party crate compatibility detection.
2019-01-23 18:56:09 +01:00
Félix Saparelli 62d24168d6
Merge pull request #102 from Mange/fix-tty-output
Support running commands that allocate their own TTYs (*nix)
2019-01-19 18:48:43 +13:00
Magnus Bergmark 9fd25dd667
Use setsid() instead of setpgid()
This makes it possible to run commands that allocates TTYs and still
capture their output and reap the process on completion.

> setpgid — set process group ID for job control
> setsid — create session and set process group ID

With this in place, the `waitpid` call detects that the process has
exited even if the process allocated a TTY, and is able to unblock the
runner and continue.

Further, the output of the command is also shown in the controlling
terminal.
2019-01-17 13:21:27 +01:00
Félix Saparelli e0f649d79a Update clap version out of lock file, fixes #76 2018-12-15 14:24:43 +13:00
Félix Saparelli f6b16813aa Cfg off remaining items for a clean win/mac build
Closes #98
2018-10-05 20:56:06 +13:00
Félix Saparelli cee1712c4f Link up glob syntax documentation 2018-09-29 13:40:06 +12:00
Félix Saparelli ba23ed09f6 Fix tests 2018-09-09 16:16:40 +12:00
Félix Saparelli dc712197c0 1.9.2: revert whitespace changes 2018-09-09 16:03:01 +12:00
Félix Saparelli 0cc3110c7d 1.9.1 2018-09-09 15:01:18 +12:00
Félix Saparelli 4d283313fa Also build deb package 2018-09-09 15:00:51 +12:00
Félix Saparelli 3c1eaa51f7 Add missing impl for StdError 2018-09-09 10:38:07 +12:00
Félix Saparelli 9e09c98f96 Update earliest rust version 2018-09-09 00:03:30 +12:00
Félix Saparelli 2c5c145042 Extract errors into one thing and return a result more often 2018-09-08 23:51:44 +12:00
Félix Saparelli a6163cc599 Formatting 2018-09-08 20:08:36 +12:00
Félix Saparelli 9c60148b66
Merge pull request #95 from watchexec/wrap-whitespace-in-args
Wrap whitespace and quotes in command arguments
2018-09-08 19:44:39 +12:00
Félix Saparelli 5461c6ff1b
Merge pull request #74 from jaemk/fix_panic
don't panic on missing folder
2018-09-08 19:43:44 +12:00
Félix Saparelli 718647e386
Merge branch 'master' into fix_panic 2018-09-08 19:43:20 +12:00
Félix Saparelli 68c4973c09
Merge pull request #96 from sumnerevans/patch-1
Added installation instructions for Arch Linux
2018-09-04 10:24:53 +12:00
Sumner Evans 3288c1fad3
Added installation instructions for Arch Linux
watchexec is in the Arch User Repository (AUR). This adds instructions for installing on Arch Linux via the AUR.
2018-09-03 14:08:55 -06:00
Félix Saparelli 7375db5ce9 Also wrap when there’s quotes but no whitespace 2018-08-22 08:17:36 +12:00
Félix Saparelli 21d4080183 Wrap whitespace in arguments
Fixes #82
Fixes #87
2018-08-22 07:15:20 +12:00
Félix Saparelli 39a4a52f80 Restore 1.20 compatibility 2018-08-22 07:14:55 +12:00
Félix Saparelli ef0e6df8d4 Remove duplication between main/lib files 2018-08-22 00:10:57 +12:00
Félix Saparelli 88297f7866 Avoid impossible deploy situation with appveyor 2018-08-21 18:44:00 +12:00
Félix Saparelli 3069f4bb83 Install rustup target for musl 2018-08-21 16:28:42 +12:00
Félix Saparelli 2ac3c2ec5d Enable musl targets on linux (closes #89) 2018-08-21 16:06:58 +12:00
Félix Saparelli c73b57bcc2 Increase compression level for releases 2018-08-21 15:57:35 +12:00
Félix Saparelli 0480c1f645 Enable travis fast finish 2018-08-21 15:25:43 +12:00
Félix Saparelli 0bb32d5c49 Update minimum version 2018-08-21 15:18:13 +12:00
Félix Saparelli 3842d8c224 Adjust CI 2018-08-21 15:12:00 +12:00
Félix Saparelli f5d8d134a0 1.9.0 2018-08-19 21:31:46 +12:00
Félix Saparelli c7f7e18e3b Update man page with WATCHEXEC_*_PATH modifications from #90 2018-08-19 21:14:42 +12:00
Félix Saparelli f61b7507af Update dependencies 2018-08-19 20:58:47 +12:00
Félix Saparelli 83a3e3b085
Merge pull request #90 from Calinou/update-env-variable-documentation
Update the environment variable documentation in README
2018-08-19 20:45:11 +12:00
Félix Saparelli 750dcb197d
Merge pull request #91 from rasa/patch-1
Add scoop installation instructions to readme
2018-08-19 20:32:47 +12:00
Félix Saparelli 31fdca564a
Merge pull request #93 from tailhook/max_user_watches
Add a warning and fallback on polling mode if limit exceeded
2018-08-19 20:29:44 +12:00