vagrant-scp-sync 0.5.22 → 0.5.24

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: 118c8a7f4131343bad9fc3f019f66c6a8df7259b0c9e7f4779737ef5edb95ad6
4
- data.tar.gz: 3ca0ee379eb5ab8a2590149a2ee4538a213340a7709055a13ea4683f258625e3
3
+ metadata.gz: b8ea86918db593ce6126add66de0626dcacfd459be232571d5bcce2a37a2001b
4
+ data.tar.gz: 5e89431618de8223b5e1f3aae8d674ecec9fde75e99e67ffce0be7e534119825
5
5
  SHA512:
6
- metadata.gz: 411fbf3bb456ac7940e9fbd0fac4edfb65a101f14164b31cae1639194269cda1a2594851645ae79f31789a4da8e0a96ed5459228caa7de02f23b18f6308d4edb
7
- data.tar.gz: 9e6c6e515f831c6286adf8f817e60ad47ca0675e243a8c807445ea64b38b327ce0a326f05593144d22b4c5fb3de5f28280c02c0ce67abfee6e46f4545e62977d
6
+ metadata.gz: 9385b53ed26fda63f126b11df9b00b2498bcde636adc314bf8586d9bf226f816a664cba69592cee9edace2717ad78b16501935d8496d139deb53cfcec002d415
7
+ data.tar.gz: f28ab6c87f427e35d50e65c2503b46b313e5a10e5a1286bc39f351c3a493432a4471fab7fed4dad704f4c06aff8c983e995e9b4cc724487e6383d5f234bf5e95
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.24](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.23...v0.5.24) (2025-01-14)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that ([0c0afc0](https://github.com/STARTcloud/vagrant-scp-sync/commit/0c0afc012bb99fb28de97575c4256bf622e60d16))
9
+
10
+ ## [0.5.23](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.22...v0.5.23) (2025-01-14)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * FIle paths with quotes break things, this is an attempt to workaround/fix that ([2192a8c](https://github.com/STARTcloud/vagrant-scp-sync/commit/2192a8c97de0749dcb4038d5ea485b2b186325c8))
16
+
3
17
  ## [0.5.22](https://github.com/STARTcloud/vagrant-scp-sync/compare/v0.5.21...v0.5.22) (2025-01-14)
4
18
 
5
19
 
@@ -42,8 +42,8 @@ module VagrantPlugins
42
42
 
43
43
  if opts[:direction] == :upload || opts[:direction].nil?
44
44
  # For upload direction
45
- target_check = build_ssh_command(ssh_opts, "test -e #{target_files} && echo 'EXISTS' || echo 'NOT_EXISTS'", ssh_info)
46
- target_type_check = build_ssh_command(ssh_opts, "test -d #{target_files} && echo 'DIR' || echo 'FILE'", ssh_info)
45
+ target_check = build_ssh_command(ssh_opts, "test -e '#{target_files}' && echo 'EXISTS' || echo 'NOT_EXISTS'", ssh_info)
46
+ target_type_check = build_ssh_command(ssh_opts, "test -d '#{target_files}' && echo 'DIR' || echo 'FILE'", ssh_info)
47
47
 
48
48
  # Check if target exists and its type
49
49
  target_exists = execute_command_with_output(machine, target_check).strip == 'EXISTS'
@@ -51,16 +51,16 @@ 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}/*" # Copy contents of directory
54
+ "'#{source_files}'/*" # Quote path but leave glob outside quotes
55
55
  else
56
- source_files # Copy directory itself or single file
56
+ "'#{source_files}'" # Copy directory itself or single file with quotes
57
57
  end
58
58
 
59
59
  # Determine target path based on existence and trailing slash
60
- target_base = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{target_files}"
60
+ target_base = "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_files}'"
61
61
  target = if target_exists && target_is_dir && !has_trailing_slash_target
62
62
  # If target exists as directory but no trailing slash, put source inside it
63
- "#{target_base}/#{File.basename(source_files)}"
63
+ "#{ssh_info[:username]}@#{ssh_info[:host]}:'#{target_files}/#{File.basename(source_files)}'"
64
64
  else
65
65
  target_base
66
66
  end
@@ -69,21 +69,21 @@ module VagrantPlugins
69
69
  target_dir = target_files
70
70
  target_dir = File.dirname(target_files) unless target_is_dir || has_trailing_slash_target
71
71
 
72
- make_dir = build_ssh_command(ssh_opts, "sudo mkdir -p #{target_dir}", ssh_info)
73
- change_ownership = build_ssh_command(ssh_opts, "sudo chown -R #{opts[:owner]}:#{opts[:group]} #{target_dir}", ssh_info)
74
- change_permissions = build_ssh_command(ssh_opts, "sudo chmod -R 777 #{target_dir}", ssh_info)
75
- remove_dir = build_ssh_command(ssh_opts, "sudo rm -rf #{target_files}", ssh_info) if delete
72
+ make_dir = build_ssh_command(ssh_opts, "sudo mkdir -p '#{target_dir}'", ssh_info)
73
+ change_ownership = build_ssh_command(ssh_opts, "sudo chown -R #{opts[:owner]}:#{opts[:group]} '#{target_dir}'", ssh_info)
74
+ change_permissions = build_ssh_command(ssh_opts, "sudo chmod -R 777 '#{target_dir}'", ssh_info)
75
+ remove_dir = build_ssh_command(ssh_opts, "sudo rm -rf '#{target_files}'", ssh_info) if delete
76
76
 
77
77
  elsif opts[:direction] == :download
78
78
  # For download direction
79
- source = "#{ssh_info[:username]}@#{ssh_info[:host]}:#{source_files}"
80
- source = "#{source}/*" if has_trailing_slash_source
79
+ 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
- target = target_files
83
+ target = "'#{target_files}'"
84
84
  target_dir = target_files
85
85
  target_dir = File.dirname(target_files) unless File.directory?(target_files) || has_trailing_slash_target
86
- make_dir = "mkdir -p #{target_dir}"
86
+ make_dir = "mkdir -p '#{target_dir}'"
87
87
  end
88
88
 
89
89
  # Execute commands silently for setup
@@ -115,7 +115,7 @@ module VagrantPlugins
115
115
  end
116
116
 
117
117
  def self.build_scp_command(scp_path, ssh_opts, source, target)
118
- [scp_path, '-r', *ssh_opts, "'#{source}'", "'#{target}'"].join(' ')
118
+ [scp_path, '-r', *ssh_opts, source, target].join(' ')
119
119
  end
120
120
 
121
121
  def self.execute_command(machine, command, raise_error, message_key, opts)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Vagrant
4
4
  module ScpSync
5
- VERSION = '0.5.22'
5
+ VERSION = '0.5.24'
6
6
  NAME = 'vagrant-scp-sync'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-scp-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.22
4
+ version: 0.5.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gilbert