vagrant-scp-sync 0.5.23 → 0.5.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/vagrant-scp-sync/action/scp_sync.rb +7 -6
- data/lib/vagrant-scp-sync/command/scp.rb +2 -5
- data/lib/vagrant-scp-sync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cb714f9207494b148c9470d8b01f91cd57c8fff99c797827f050b750b59efd9
|
4
|
+
data.tar.gz: d68f414a56e4fd8dd096a14d37588cb8247e9e62779a15f4e57d33f9f53e2095
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1f89779f2a724722bf5c39299c5719854db9b5128e2e204648ddddd206ef20c23e94834989b1e8bf5fa2466a81f0234b1b3b0896bd73d92ccd6648be01e61a2
|
7
|
+
data.tar.gz: ccfd87df8f36614eaf0825ca3af59ee478df4ecd5ae9a853dad16e1a7b54d9ab47e867054dbedbe27e3769f5dae0326c4bae1c16e16cd939e7d6c1bb93262ec7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.5.25](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.24...v0.5.25) (2025-01-15)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* FIle paths with quotes break things, this is an attempt to workaround/fix that ([ec704c1](https://github.com/STARTcloud/vagrant-scp-sync/commit/ec704c16d2d49436f842e3e490ea61b9b1f0d322))
|
9
|
+
* 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))
|
10
|
+
|
11
|
+
## [0.5.24](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.23...v0.5.24) (2025-01-14)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* FIle paths with quotes break things, this is an attempt to workaround/fix that ([0c0afc0](https://github.com/STARTcloud/vagrant-scp-sync/commit/0c0afc012bb99fb28de97575c4256bf622e60d16))
|
17
|
+
|
3
18
|
## [0.5.23](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.22...v0.5.23) (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
|
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
|
|
@@ -51,7 +51,7 @@ module VagrantPlugins
|
|
51
51
|
|
52
52
|
# Determine source path based on trailing slash and directory status
|
53
53
|
source = if is_source_directory && has_trailing_slash_source
|
54
|
-
"'#{source_files}/*
|
54
|
+
"'#{source_files}'/*" # Quote path but leave glob outside quotes
|
55
55
|
else
|
56
56
|
"'#{source_files}'" # Copy directory itself or single file with quotes
|
57
57
|
end
|
@@ -77,7 +77,7 @@ module VagrantPlugins
|
|
77
77
|
elsif opts[:direction] == :download
|
78
78
|
# For download direction
|
79
79
|
source = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{source_files}'"
|
80
|
-
source = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{source_files}/*
|
80
|
+
source = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{source_files}'/*" if has_trailing_slash_source
|
81
81
|
|
82
82
|
# Create local target directory without sudo
|
83
83
|
target = "'#{target_files}'"
|
@@ -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(
|
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(
|
118
|
-
|
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
|
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
|
49
|
+
VagrantPlugins::ScpSync::ScpSyncHelper.scp_single(machine, folder_opts)
|
53
50
|
end
|
54
51
|
end
|
55
52
|
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.
|
4
|
+
version: 0.5.25
|
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-
|
11
|
+
date: 2025-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|