vagrant-scp-sync 0.5.24 → 0.5.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8ea86918db593ce6126add66de0626dcacfd459be232571d5bcce2a37a2001b
4
- data.tar.gz: 5e89431618de8223b5e1f3aae8d674ecec9fde75e99e67ffce0be7e534119825
3
+ metadata.gz: 61f1926cb1f70c6621ac3b31fbf2edbd46589ee4a8c29242c8db7f0908a17496
4
+ data.tar.gz: d13e86d331ee8963264d3515f43affcc0421dffed7459f8bb12585af82ecd156
5
5
  SHA512:
6
- metadata.gz: 9385b53ed26fda63f126b11df9b00b2498bcde636adc314bf8586d9bf226f816a664cba69592cee9edace2717ad78b16501935d8496d139deb53cfcec002d415
7
- data.tar.gz: f28ab6c87f427e35d50e65c2503b46b313e5a10e5a1286bc39f351c3a493432a4471fab7fed4dad704f4c06aff8c983e995e9b4cc724487e6383d5f234bf5e95
6
+ metadata.gz: 5b5045fb6e101431eaa8fd3a2f6e129aad58721a96f326aa939c83663c8effb618d7021d664975782169d16c53a5428eb235d6fd08e0ee94df29cb8c53752a14
7
+ data.tar.gz: 670d25bf4857c3dcc0e2daab2051794ab2b3835b588be8f3cc2232621c37d0142135ef7d770abbeee425125f68389bf24f8d8cdd08f92a8c9a7a414b4550057c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.26](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.25...v0.5.26) (2025-01-15)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that - making rubocop happy ([83bc118](https://github.com/STARTcloud/vagrant-scp-sync/commit/83bc1184d3809da8af81af2e2795f4725615e425))
9
+
10
+ ## [0.5.25](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.24...v0.5.25) (2025-01-15)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that ([ec704c1](https://github.com/STARTcloud/vagrant-scp-sync/commit/ec704c16d2d49436f842e3e490ea61b9b1f0d322))
16
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that - making rubocop happy ([09797b5](https://github.com/STARTcloud/vagrant-scp-sync/commit/09797b591d3c7e7678cf251cc41835fea3576e8a))
17
+
3
18
  ## [0.5.24](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.23...v0.5.24) (2025-01-14)
4
19
 
5
20
 
@@ -20,7 +20,7 @@ module VagrantPlugins
20
20
 
21
21
  # This will SCP the files
22
22
  class ScpSyncHelper
23
- def self.scp_single(machine, opts, scp_path)
23
+ def self.scp_single(machine, opts)
24
24
  ssh_info = machine.ssh_info
25
25
  raise Vagrant::Errors::SSHNotReady if ssh_info.nil?
26
26
 
@@ -97,7 +97,7 @@ module VagrantPlugins
97
97
  end
98
98
 
99
99
  # Build and execute the scp command with sync message
100
- synchronize = build_scp_command(scp_path, ssh_opts, source, target)
100
+ synchronize = build_scp_command(ssh_opts, source, target)
101
101
  execute_command(machine, synchronize, true, 'scp_sync_folder', opts)
102
102
  end
103
103
 
@@ -114,8 +114,9 @@ module VagrantPlugins
114
114
  ['ssh', *ssh_opts, "#{ssh_info[:username]}@#{ssh_info[:host]}", "'#{command}'"].join(' ')
115
115
  end
116
116
 
117
- def self.build_scp_command(scp_path, ssh_opts, source, target)
118
- [scp_path, '-r', *ssh_opts, source, target].join(' ')
117
+ def self.build_scp_command(ssh_opts, source, target)
118
+ # Just use 'scp' and let the shell find it, like we do with ssh
119
+ ['scp', '-r', *ssh_opts, source, target].join(' ')
119
120
  end
120
121
 
121
122
  def self.execute_command(machine, command, raise_error, message_key, opts)
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'pathname'
4
4
  require 'vagrant/util/subprocess'
5
- require 'vagrant/util/which'
6
5
 
7
6
  module VagrantPlugins
8
7
  module ScpSync
@@ -22,16 +21,14 @@ module VagrantPlugins
22
21
  if @source.nil? && @target.nil?
23
22
  folders = machine.config.vm.synced_folders
24
23
  ssh_info = machine.ssh_info
25
- scp_path = Vagrant::Util::Which.which('scp')
26
24
  machine.ui.warn(I18n.t('vagrant.scp_ssh_password')) if ssh_info[:private_key_path].empty? && ssh_info[:password]
27
25
  folders.each_value do |folder_opts|
28
26
  next unless folder_opts[:type] == :scp
29
27
 
30
- VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
28
+ VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts)
31
29
  end
32
30
  else
33
31
  ssh_info = machine.ssh_info
34
- scp_path = Vagrant::Util::Which.which('scp')
35
32
  direction = net_ssh_command(@source)
36
33
  source = format_file_path(machine, @source)
37
34
  target = format_file_path(machine, @target)
@@ -49,7 +46,7 @@ module VagrantPlugins
49
46
  hostpath: source
50
47
  }
51
48
 
52
- VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
49
+ VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts)
53
50
  end
54
51
  end
55
52
  end
@@ -31,12 +31,13 @@ module VagrantPlugins
31
31
 
32
32
  def enable(machine, folders, _opts)
33
33
  ssh_info = machine.ssh_info
34
- scp_path = Which.which('scp')
34
+ # Still check if scp exists, but don't pass the path
35
+ return false unless Which.which('scp')
35
36
 
36
37
  machine.ui.warn(I18n.t('vagrant.scp_ssh_password')) if ssh_info[:private_key_path].empty? && ssh_info[:password]
37
38
 
38
39
  folders.each_value do |folder_opts|
39
- ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
40
+ ScpSyncHelper.scp_single(machine, folder_opts)
40
41
  end
41
42
  end
42
43
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Vagrant
4
4
  module ScpSync
5
- VERSION = '0.5.24'
5
+ VERSION = '0.5.26'
6
6
  NAME = 'vagrant-scp-sync'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-scp-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.24
4
+ version: 0.5.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gilbert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-14 00:00:00.000000000 Z
11
+ date: 2025-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n