Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not checking fswatch installation properly #596

Closed
noqcks opened this issue Aug 6, 2018 · 3 comments
Closed

Not checking fswatch installation properly #596

noqcks opened this issue Aug 6, 2018 · 3 comments
Labels
Milestone

Comments

@noqcks
Copy link

noqcks commented Aug 6, 2018

When fswatch is not installed docker sync asks if you want to install it, you press Y, it installs fswatch, but it doesn't pick up fswatch as actually being there until a restart of docker-sync. See Notes below.

Error/Feature Requestion/Docs

Error

Docker Driver

N/A

Sync strategy

N/A

your docker-sync.yml

N/A

OS

Mac OS 10.13.6

Logs

➜  AdaSupport git:(removing-env-files) ✗ docker-sync-stack start
     warning  Could not find fswatch. Trying to install it now.
Install fswatch for you? [y/N] y
     command  brew install fswatch
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
pandoc

==> Downloading https://homebrew.bintray.com/bottles/fswatch-1.12.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fswatch-1.12.0.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/fswatch/1.12.0: 50 files, 1.2MB
       note:  You can also run docker-sync in the background with docker-sync start
     warning  Could not find fswatch. Trying to install it now.
Install fswatch for you? [y/N] y
     command  brew install fswatch
Warning: fswatch 1.12.0 is already installed and up-to-date
To reinstall 1.12.0, run `brew reinstall fswatch`
     warning  Could not find fswatch. Trying to install it now.
Install fswatch for you? [y/N] y
     command  brew install fswatch
Warning: fswatch 1.12.0 is already installed and up-to-date
To reinstall 1.12.0, run `brew reinstall fswatch`
     warning  Could not find fswatch. Trying to install it now.
Install fswatch for you? [y/N] /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor/readline.rb:20:in `readline': Interrupt
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor/readline.rb:20:in `readline'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/line_editor.rb:7:in `readline'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/shell/basic.rb:411:in `ask_simply'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/shell/basic.rb:77:in `ask'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/shell/basic.rb:120:in `yes?'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/forwardable.rb:202:in `yes?'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/dependencies/package_managers/base.rb:34:in `ask_user_confirmation'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/dependencies/package_managers/base.rb:28:in `install_package'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/dependencies/package_managers/base.rb:17:in `install_package'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/forwardable.rb:202:in `install_package'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/dependencies/fswatch.rb:10:in `ensure!'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/watch_strategy/fswatch.rb:21:in `initialize'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_process.rb:61:in `new'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_process.rb:61:in `set_watch_strategy'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_process.rb:40:in `initialize'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:139:in `new'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:139:in `create_sync'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:75:in `block in init_sync_processes'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:74:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:74:in `init_sync_processes'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/lib/docker-sync/sync_manager.rb:108:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/tasks/stack/stack.thor:46:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/docker-sync-0.5.7/bin/docker-sync-stack:15:in `<top (required)>'
	from /usr/local/bin/docker-sync-stack:22:in `load'
	from /usr/local/bin/docker-sync-stack:22:in `<main>'
➜  AdaSupport git:(removing-env-files) ✗ docker-sync-stack start
       note:  You can also run docker-sync in the background with docker-sync start
          ok  Starting rsync for sync chat-rsync
          ok  Synced /Users/noqcks/data/AdaSupport/chat/
     success  Rsync server started
          ok  Synced /Users/noqcks/data/AdaSupport/chat/
     success  Starting to watch /Users/noqcks/data/AdaSupport/chat/ - Press CTRL-C to stop
          ok  Starting rsync for sync app-rsync
          ok  Synced /Users/noqcks/data/AdaSupport/app/
     success  Rsync server started
          ok  Synced /Users/noqcks/data/AdaSupport/app/
     success  Starting to watch /Users/noqcks/data/AdaSupport/app/ - Press CTRL-C to stop
          ok  Starting rsync for sync api-rsync
          ok  Synced /Users/noqcks/data/AdaSupport/api/
     success  Rsync server started
          ok  Synced /Users/noqcks/data/AdaSupport/api/
     success  Starting to watch /Users/noqcks/data/AdaSupport/api/ - Press CTRL-C to stop
          ok  starting compose
@EugenMayer
Copy link
Owner

so it needs a restart / cancel on fswatch. Good point, you are willing to provide a PR? :)

@EugenMayer
Copy link
Owner

myabe just exit 1 here https://github.com/EugenMayer/docker-sync/blob/master/lib/docker-sync/dependencies/fswatch.rb#L10 after the installation with a proper message

@EugenMayer EugenMayer added this to the 0.5.8 milestone Sep 30, 2018
@EugenMayer EugenMayer added the bug label Sep 30, 2018
@EugenMayer
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants