vagrant-scp-sync 0.5.26 → 0.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b57515d717378b1daf432022a6c9b288503e116b08645bb0ddaa89a14719c295
|
4
|
+
data.tar.gz: 5c26d7d94fd7dbafc95efe661617d27c7b4ddbf345b537af7c20a4ef354a2d7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90334be946bf82fea5f69fa97f3070e75dec9ee07baa8829d86b995c32bc0138077a956fe065cd69dbac04a3b2f94b3cb565d5f327b0b3709a9ea23082168b2c
|
7
|
+
data.tar.gz: 19d2079b97289af6d5366367d58b299fd10a9263603f89e167e34b32652e1cabe58c8c8687c5b5a689f60a5e87697cae56fe662aa90d7f3081fc6a18adf652a8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.5.27](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.26...v0.5.27) (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 ([525d3f3](https://github.com/STARTcloud/vagrant-scp-sync/commit/525d3f396c503e79d2a0fc700b6e24de55379321))
|
9
|
+
|
3
10
|
## [0.5.26](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.25...v0.5.26) (2025-01-15)
|
4
11
|
|
5
12
|
|
@@ -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)
|
23
|
+
def self.scp_single(machine, opts, scp_path)
|
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(ssh_opts, source, target)
|
100
|
+
synchronize = build_scp_command(scp_path, ssh_opts, source, target)
|
101
101
|
execute_command(machine, synchronize, true, 'scp_sync_folder', opts)
|
102
102
|
end
|
103
103
|
|
@@ -114,9 +114,8 @@ 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(ssh_opts, source, target)
|
118
|
-
|
119
|
-
['scp', '-r', *ssh_opts, source, target].join(' ')
|
117
|
+
def self.build_scp_command(scp_path, ssh_opts, source, target)
|
118
|
+
[scp_path, '-r', *ssh_opts, source, target].join(' ')
|
120
119
|
end
|
121
120
|
|
122
121
|
def self.execute_command(machine, command, raise_error, message_key, opts)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'pathname'
|
4
4
|
require 'vagrant/util/subprocess'
|
5
|
+
require 'vagrant/util/which'
|
5
6
|
|
6
7
|
module VagrantPlugins
|
7
8
|
module ScpSync
|
@@ -21,14 +22,16 @@ module VagrantPlugins
|
|
21
22
|
if @source.nil? && @target.nil?
|
22
23
|
folders = machine.config.vm.synced_folders
|
23
24
|
ssh_info = machine.ssh_info
|
25
|
+
scp_path = Vagrant::Util::Which.which('scp')
|
24
26
|
machine.ui.warn(I18n.t('vagrant.scp_ssh_password')) if ssh_info[:private_key_path].empty? && ssh_info[:password]
|
25
27
|
folders.each_value do |folder_opts|
|
26
28
|
next unless folder_opts[:type] == :scp
|
27
29
|
|
28
|
-
VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts)
|
30
|
+
VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
|
29
31
|
end
|
30
32
|
else
|
31
33
|
ssh_info = machine.ssh_info
|
34
|
+
scp_path = Vagrant::Util::Which.which('scp')
|
32
35
|
direction = net_ssh_command(@source)
|
33
36
|
source = format_file_path(machine, @source)
|
34
37
|
target = format_file_path(machine, @target)
|
@@ -46,7 +49,7 @@ module VagrantPlugins
|
|
46
49
|
hostpath: source
|
47
50
|
}
|
48
51
|
|
49
|
-
VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts)
|
52
|
+
VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
@@ -31,13 +31,12 @@ module VagrantPlugins
|
|
31
31
|
|
32
32
|
def enable(machine, folders, _opts)
|
33
33
|
ssh_info = machine.ssh_info
|
34
|
-
|
35
|
-
return false unless Which.which('scp')
|
34
|
+
scp_path = Which.which('scp')
|
36
35
|
|
37
36
|
machine.ui.warn(I18n.t('vagrant.scp_ssh_password')) if ssh_info[:private_key_path].empty? && ssh_info[:password]
|
38
37
|
|
39
38
|
folders.each_value do |folder_opts|
|
40
|
-
ScpSyncHelper.scp_single(machine, folder_opts)
|
39
|
+
ScpSyncHelper.scp_single(machine, folder_opts, scp_path)
|
41
40
|
end
|
42
41
|
end
|
43
42
|
end
|