-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed migration script #90
base: dev
Are you sure you want to change the base?
Conversation
# Incrementar el contador de items movidos | ||
$movedItems++ | ||
} catch { | ||
Write-Host "Error moving item: $($item.FullName)" |
Check warning
Code scanning / PSScriptAnalyzer
File 'emuDeckMigration.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
@@ -131,16 +162,22 @@ | |||
Migration_updateSRM $origin $destination | |||
|
|||
# Recargar las ubicaciones de las partidas guardadas | |||
Write-Host "Reconfigurando los enlaces simbólicos de saves..." |
Check warning
Code scanning / PSScriptAnalyzer
File 'emuDeckMigration.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
Get-Command -Name "*_IsInstalled" | ForEach-Object { | ||
$func = $_.Name | ||
Write-Host "Checking emulator: $func" |
Check warning
Code scanning / PSScriptAnalyzer
File 'emuDeckMigration.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
if (& $func) { | ||
$setup_func = $func -replace '_IsInstalled$', '_setupSaves' | ||
Write-Host "Setup function: $setup_func" |
Check warning
Code scanning / PSScriptAnalyzer
File 'emuDeckMigration.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
if (Get-Command -Name $setup_func -ErrorAction SilentlyContinue) { | ||
Write-Host "Executing: $setup_func" |
Check warning
Code scanning / PSScriptAnalyzer
File 'emuDeckMigration.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
if ($old -eq "storagePath") { | ||
$uniqueLines = @() | ||
$found = $false | ||
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
$uniqueLines += $line | ||
} | ||
} | ||
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
||
$modifiedContents = $uniqueLines | ||
} | ||
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
|
||
# Escribir el contenido modificado | ||
$modifiedContents | Set-Content $fileToCheck -Encoding UTF8 | ||
|
Check notice
Code scanning / PSScriptAnalyzer
Line has trailing whitespace Note
# Escribir el contenido modificado | ||
$modifiedContents | Set-Content $fileToCheck -Encoding UTF8 | ||
|
||
Write-Host "Updated setting: $old to $new" |
Check warning
Code scanning / PSScriptAnalyzer
File 'helperFunctions.ps1' uses Write-Host. Avoid using Write-Host because it might not work in all hosts, does not work when there is no host, and (prior to PS 5.0) cannot be suppressed, captured, or redirected. Instead, use Write-Output, Write-Verbose, or Write-Information. Warning
I fixed the script that caused the files in the destination to be deleted when doing a migration