vagrant-vmm 1.0.11 → 1.0.12
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTgxMzE5YjIyYjQ0NzE1YTQ2N2JmYjVhOTI3NGFkODc2ZTllOTM4OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODI3YzYxODYwYjc1Y2Y2YjhiYjgzNzU2NjUyM2U3YWQ1ZjRkMjc3ZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWE5ODliYTMzYzQ2ZGVhODE3OGMxYjQ1MDM0NDRjMWY0OWMyNDU1YTYyNDdj
|
10
|
+
M2NjMWIwOWViZjJhM2Y2NTBmOWQyN2Y0N2U5NDY5MTRiZWFhZmFkMDZjYzgx
|
11
|
+
ZmYyZTE2ZWNiZmE4NmI2NzU5ZjA1Mzk0Y2ViZDQzMzI4NjQ2MGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Y2VmODkzODNjYjA2Y2Y3NGRjN2M0NmM1NzRiYWU0NjA5YzUxYzA0OTAwNDc5
|
14
|
+
OWMxMmMyNjc1MWIyYmIyMzk5ZjNlNmQ2MTlkY2IzNzNlMTYzZTQ5NzI5YzNl
|
15
|
+
MjRjYzI0NWY0OTY5OTY2ODFiZTgwNDIzM2U4MGUwNjJkOWVkMzQ=
|
@@ -57,7 +57,7 @@ function Get-file-hash($source_paths, $delimiter) {
|
|
57
57
|
# get empty dirs, set hash to be 0 for them
|
58
58
|
Get-ChildItem $source_path_normalized -recurse |
|
59
59
|
Where-Object {$_.PSIsContainer -eq $True} |
|
60
|
-
Where-Object {$_.GetFiles().Count -eq 0} |
|
60
|
+
Where-Object {$_.GetFiles().Count -eq 0 -and $_.GetDirectories().Count -eq 0} |
|
61
61
|
Select-Object FullName | ForEach-Object -Process {
|
62
62
|
$source_files[$source_path] += $_.FullName.Replace($source_path_normalized, "") + $delimiter + "0"
|
63
63
|
}
|
@@ -112,22 +112,38 @@ function Send-File
|
|
112
112
|
$position = 0
|
113
113
|
|
114
114
|
## Go through the input, and fill in the new array of file content
|
115
|
-
|
116
|
-
{
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
115
|
+
if ( $input )
|
116
|
+
{
|
117
|
+
foreach ($chunk in $input)
|
118
|
+
{
|
119
|
+
[GC]::Collect()
|
120
|
+
[Array]::Copy($chunk, 0, $destBytes, $position, $chunk.Length)
|
121
|
+
$position += $chunk.Length
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
if ( $position -eq 0 )
|
126
|
+
{
|
127
|
+
# create empty file
|
128
|
+
New-Item $fileDest -type file
|
129
|
+
} else
|
130
|
+
{
|
131
|
+
[IO.File]::WriteAllBytes($fileDest, $destBytes)
|
132
|
+
}
|
123
133
|
|
124
134
|
#Get-Item $fileDest
|
125
135
|
[GC]::Collect()
|
126
|
-
}
|
136
|
+
}
|
127
137
|
|
128
138
|
# Stream the chunks into the remote script.
|
129
139
|
$Length = $sourceBytes.Length
|
130
|
-
|
140
|
+
if ( $Length -eq 0 )
|
141
|
+
{
|
142
|
+
$res = Invoke-Command -Session $Session -ScriptBlock $remoteScript
|
143
|
+
} else
|
144
|
+
{
|
145
|
+
$streamChunks | Invoke-Command -Session $Session -ScriptBlock $remoteScript
|
146
|
+
}
|
131
147
|
Write-Verbose -Message "WinRM copy of [$($p)] to [$($Destination)] complete"
|
132
148
|
}
|
133
149
|
}
|
data/lib/vagrant-vmm/version.rb
CHANGED