vagrant-unison2 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-unison2/command.rb +19 -1
- data/lib/vagrant-unison2/shell_command.rb +2 -1
- data/lib/vagrant-unison2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a56396d3b841677ba05e588a000d1720dc2a8bad
|
4
|
+
data.tar.gz: 23822e18be0e28ad858c2fa2ff516279b3c6857b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edbcc038df62a9793359da3842eedfdee9f2d498f926e7100742ac0592c7e527f2c2ee6f74f8c71384d768203ae76b2a8ac7f38b153ea2de522380baa1a1fb0c
|
7
|
+
data.tar.gz: 0d6e5322228b67d435706f55bdf3e3b92c18a9e18586983d2212f9d5e937bdd9677a5d870fe35fa5e2a20855238c63feac5f83f4a78c336b92b88102c5077673
|
@@ -109,7 +109,25 @@ module VagrantPlugins
|
|
109
109
|
|
110
110
|
@env.ui.info "Running #{command}"
|
111
111
|
|
112
|
-
|
112
|
+
# Re-run on a crash.
|
113
|
+
# On a sigint, wait 2 seconds before respawning command.
|
114
|
+
# If INT comes in again while waiting, program exits.
|
115
|
+
# If INT comes in after we've respanwned,
|
116
|
+
# will bring us back to this trap handler.
|
117
|
+
exit_on_next_sigint = false
|
118
|
+
while true
|
119
|
+
begin
|
120
|
+
sleep 2 if exit_on_next_sigint
|
121
|
+
exit_on_next_sigint = false
|
122
|
+
system(command)
|
123
|
+
rescue Interrupt
|
124
|
+
exit 1 if exit_on_next_sigint
|
125
|
+
@env.ui.info '** Hit Ctrl + C again to kill. **'
|
126
|
+
exit_on_next_sigint = true
|
127
|
+
rescue Exception
|
128
|
+
@env.ui.info '** Sync crashed. Respawning. Hit Ctrl + C twice to kill. **'
|
129
|
+
end
|
130
|
+
end
|
113
131
|
end
|
114
132
|
end
|
115
133
|
|
@@ -23,7 +23,7 @@ module VagrantPlugins
|
|
23
23
|
private
|
24
24
|
|
25
25
|
def args
|
26
|
-
[
|
26
|
+
_args = [
|
27
27
|
'unison',
|
28
28
|
@paths.host,
|
29
29
|
@ssh_command.uri,
|
@@ -33,6 +33,7 @@ module VagrantPlugins
|
|
33
33
|
ignore_arg,
|
34
34
|
['-sshargs', %("#{@ssh_command.command}")],
|
35
35
|
].flatten.compact
|
36
|
+
_args
|
36
37
|
end
|
37
38
|
|
38
39
|
def batch_arg
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-unison2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Laing
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-02-
|
13
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: listen
|