Skip to content

Commit

Permalink
Merge pull request #459 from guille-moe/fix_dir_with_space
Browse files Browse the repository at this point in the history
Edit native_osx to support spaced directories.
  • Loading branch information
EugenMayer committed Sep 9, 2017
2 parents 202da1c + 922babb commit 1fcae9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/docker-sync/sync_strategy/native_osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ def start_container
run_privileged = '--privileged' if @options.key?('max_inotify_watches') #TODO: replace by the minimum capabilities required
say_status 'ok', 'Starting precopy', :white if @options['verbose']
# we just run the precopy script and remove the container
cmd = "docker run --rm -v #{volume_app_sync_name}:/app_sync -v #{host_sync_src}:/host_sync#{host_disk_mount_mode} -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image} /usr/local/bin/precopy_appsync"
cmd = "docker run --rm -v \"#{volume_app_sync_name}:/app_sync\" -v \"#{host_sync_src}:/host_sync#{host_disk_mount_mode}\" -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image} /usr/local/bin/precopy_appsync"
say_status 'precopy', cmd, :white if @options['verbose']
system(cmd) || raise('Precopy failed')
say_status 'ok', 'Starting container', :white if @options['verbose']
# this will be run below and start unison, since we did not manipulate CMD
cmd = "docker run -d -v #{volume_app_sync_name}:/app_sync -v #{host_sync_src}:/host_sync#{host_disk_mount_mode} -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image}"
cmd = "docker run -d -v \"#{volume_app_sync_name}:/app_sync\" -v \"#{host_sync_src}:/host_sync#{host_disk_mount_mode}\" -e HOST_VOLUME=/host_sync -e APP_VOLUME=/app_sync -e TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} #{additional_docker_env} #{run_privileged} --name #{container_name} #{@docker_image}"
else
say_status 'ok', "starting #{container_name} container", :white if @options['verbose']
cmd = "docker start #{container_name} && docker exec #{container_name} supervisorctl restart unison"
Expand Down

0 comments on commit 1fcae9d

Please sign in to comment.