Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/core/updater/installers/update_install_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,11 @@ if %ERRORLEVEL%==0 (
timeout /t 1 /nobreak >NUL
goto wait
)
xcopy /E /Y /I "%SRC%\\*" "%DST%\\"
robocopy "%SRC%" "%DST%" /MIR /XD "QueryaData" /XF ".portable" /R:2 /W:1
if %ERRORLEVEL% GEQ 8 (
echo Update failed with error %ERRORLEVEL%
exit /b %ERRORLEVEL%
)
start "" "%EXE%"
del "%~f0"
''';
Expand Down
4 changes: 3 additions & 1 deletion test/core/updater/update_platform_installer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void main() {
);
});

test('windows batch script waits for pid', () {
test('windows batch script waits for pid and uses robocopy mirror with exclusions', () {
final batch = buildWindowsReplaceBatch(
pid: 99,
sourceDir: 'C:\\tmp\\new',
Expand All @@ -119,6 +119,8 @@ void main() {
);
expect(batch, contains('set PID=99'));
expect(batch, contains('querya_desktop.exe'));
expect(batch, contains('robocopy "%SRC%" "%DST%" /MIR /XD "QueryaData" /XF ".portable" /R:2 /W:1'));
expect(batch, contains('if %ERRORLEVEL% GEQ 8'));
});
});

Expand Down
Loading