Unverified Commit 7de1e225 authored by Spt's avatar Spt Committed by GitHub

fix rsync output utf8decode bug (#95881)

parent 046dde3d
...@@ -190,6 +190,7 @@ class Context { ...@@ -190,6 +190,7 @@ class Context {
runSync( runSync(
'rsync', 'rsync',
<String>[ <String>[
'-8', // Avoid mangling filenames with encodings that do not match the current locale.
'-av', '-av',
'--delete', '--delete',
'--filter', '--filter',
......
...@@ -451,8 +451,9 @@ class _MacOSUtils extends _PosixUtils { ...@@ -451,8 +451,9 @@ class _MacOSUtils extends _PosixUtils {
); );
for (final FileSystemEntity unzippedFile in tempDirectory.listSync(followLinks: false)) { for (final FileSystemEntity unzippedFile in tempDirectory.listSync(followLinks: false)) {
// rsync --delete the unzipped files so files removed from the archive are also removed from the target. // rsync --delete the unzipped files so files removed from the archive are also removed from the target.
// Add the '-8' parameter to avoid mangling filenames with encodings that do not match the current locale.
_processUtils.runSync( _processUtils.runSync(
<String>['rsync', '-av', '--delete', unzippedFile.path, targetDirectory.path], <String>['rsync', '-8', '-av', '--delete', unzippedFile.path, targetDirectory.path],
throwOnError: true, throwOnError: true,
verboseExceptions: true, verboseExceptions: true,
); );
......
...@@ -462,6 +462,7 @@ Future<XcodeBuildResult> buildXcodeProject({ ...@@ -462,6 +462,7 @@ Future<XcodeBuildResult> buildXcodeProject({
await globals.processUtils.run( await globals.processUtils.run(
<String>[ <String>[
'rsync', 'rsync',
'-8', // Avoid mangling filenames with encodings that do not match the current locale.
'-av', '-av',
'--delete', '--delete',
expectedOutputDirectory, expectedOutputDirectory,
......
...@@ -84,6 +84,7 @@ void main() { ...@@ -84,6 +84,7 @@ void main() {
return FakeCommand( return FakeCommand(
command: const <String>[ command: const <String>[
'rsync', 'rsync',
'-8',
'-av', '-av',
'--delete', '--delete',
'build/ios/Release-iphoneos/Runner.app', 'build/ios/Release-iphoneos/Runner.app',
......
...@@ -586,6 +586,7 @@ void main() { ...@@ -586,6 +586,7 @@ void main() {
), ),
FakeCommand(command: <String>[ FakeCommand(command: <String>[
'rsync', 'rsync',
'-8',
'-av', '-av',
'--delete', '--delete',
tempDirectory.childDirectory('dirA').path, tempDirectory.childDirectory('dirA').path,
...@@ -593,6 +594,7 @@ void main() { ...@@ -593,6 +594,7 @@ void main() {
]), ]),
FakeCommand(command: <String>[ FakeCommand(command: <String>[
'rsync', 'rsync',
'-8',
'-av', '-av',
'--delete', '--delete',
tempDirectory.childDirectory('dirB').path, tempDirectory.childDirectory('dirB').path,
......
...@@ -188,6 +188,7 @@ void main() { ...@@ -188,6 +188,7 @@ void main() {
processManager.addCommand(const FakeCommand(command: kRunReleaseArgs)); processManager.addCommand(const FakeCommand(command: kRunReleaseArgs));
processManager.addCommand(const FakeCommand(command: <String>[ processManager.addCommand(const FakeCommand(command: <String>[
'rsync', 'rsync',
'-8',
'-av', '-av',
'--delete', '--delete',
'build/ios/Release-iphoneos/My Super Awesome App.app', 'build/ios/Release-iphoneos/My Super Awesome App.app',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment