Skip to content

Commit 8a1a662

Browse files
authored
🐛 Remove the validate parameter when calling SteamCMD (#37)
* 🐛 Change so SteamCMD does not validate as default * 📝 Keep changelog up to date
1 parent 56763a1 commit 8a1a662

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ etc.
2525
sub directory preventing any logging until the directory is created (#29).
2626
- Fixed issue with the update workflow being corrupted if the server were online
2727
at the beginning of the update (#30).
28+
- Update-SteamApp
29+
- Remove the validate parameter when calling SteamCMD. Validation will overwrite
30+
any files that have been changed. This may cause issues with customized
31+
servers (#33).
2832

2933
## [3.1.1] - 12/07-2020
3034

SteamPS/Public/Server/Update-SteamApp.ps1

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ function Update-SteamApp {
2424
2525
Beware, the following arguments are already used:
2626
27-
If you use Steam login to install/upload the app the following arguments are already used: "+login $SteamUserName $SteamPassword +force_install_dir $Path +app_update $SteamAppID $Arguments validate +quit"
27+
If you use Steam login to install/upload the app the following arguments are already used: "+login $SteamUserName $SteamPassword +force_install_dir $Path +app_update $SteamAppID $Arguments +quit"
2828
29-
If you use anonymous login to install/upload the app the following arguments are already used: "+login anonymous +force_install_dir $Path +app_update $SteamAppID $Arguments validate +quit"
29+
If you use anonymous login to install/upload the app the following arguments are already used: "+login anonymous +force_install_dir $Path +app_update $SteamAppID $Arguments +quit"
3030
3131
.PARAMETER Force
3232
The Force parameter allows the user to skip the "Should Continue" box.
3333
3434
.EXAMPLE
35-
Update-SteamApp -ApplicationName 'Arma 3' -Credential 'Toby' -Path 'C:\Servers\Arma3'
35+
Update-SteamApp -ApplicationName 'Arma 3' -Credential 'Toby' -Path 'C:\DedicatedServers\Arma3'
3636
3737
Because there are multiple hits when searching for Arma 3, the user will be promoted to select the right application.
3838
3939
.EXAMPLE
40-
Update-SteamApp -AppID 376030 -Path 'C:\Servers'
40+
Update-SteamApp -AppID 376030 -Path 'C:\DedicatedServers\ARK-SurvivalEvolved'
4141
4242
Here we use anonymous login because the particular application (ARK: Survival Evolved Dedicated Server) doesn't require login.
4343
@@ -110,15 +110,15 @@ function Update-SteamApp {
110110
# If Steam username and Steam password are not empty we use them for logging in.
111111
if ($null -ne $Credential.UserName) {
112112
Write-Verbose -Message "Logging into Steam as $($Credential | Select-Object -ExpandProperty UserName)."
113-
$SteamCMDProcess = Start-Process -FilePath (Get-SteamPath).Executable -NoNewWindow -ArgumentList "+login $($Credential.UserName) $($Credential.GetNetworkCredential().Password) +force_install_dir `"$Path`" +app_update $SteamAppID $Arguments validate +quit" -Wait -PassThru
113+
$SteamCMDProcess = Start-Process -FilePath (Get-SteamPath).Executable -NoNewWindow -ArgumentList "+login $($Credential.UserName) $($Credential.GetNetworkCredential().Password) +force_install_dir `"$Path`" +app_update $SteamAppID $Arguments +quit" -Wait -PassThru
114114
if ($SteamCMDProcess.ExitCode -ne 0) {
115115
Write-Error -Message ("SteamCMD closed with ExitCode {0}" -f $SteamCMDProcess.ExitCode) -Category CloseError
116116
}
117117
}
118118
# If Steam username and Steam password are empty we use anonymous login.
119119
elseif ($null -eq $Credential.UserName) {
120120
Write-Verbose -Message 'Using SteamCMD as anonymous.'
121-
$SteamCMDProcess = Start-Process -FilePath (Get-SteamPath).Executable -NoNewWindow -ArgumentList "+login anonymous +force_install_dir `"$Path`" +app_update $SteamAppID $Arguments validate +quit" -Wait -PassThru
121+
$SteamCMDProcess = Start-Process -FilePath (Get-SteamPath).Executable -NoNewWindow -ArgumentList "+login anonymous +force_install_dir `"$Path`" +app_update $SteamAppID $Arguments +quit" -Wait -PassThru
122122
if ($SteamCMDProcess.ExitCode -ne 0) {
123123
Write-Error -Message ("SteamCMD closed with ExitCode {0}" -f $SteamCMDProcess.ExitCode) -Category CloseError
124124
}

0 commit comments

Comments
 (0)