Skip to content

Commit 1ad8b3f

Browse files
committed
Do not mark a server as "not installed" when updating it's startup arguments
1 parent 2eccfcc commit 1ad8b3f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/Services/Servers/StartupModificationService.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ protected function updateAdministrativeSettings(array $data, Server &$server)
101101
]);
102102
}
103103

104-
$server->forceFill([
105-
'installed' => 0,
104+
$server->fill([
106105
'startup' => $data['startup'] ?? $server->startup,
107106
'skip_scripts' => $data['skip_scripts'] ?? isset($data['skip_scripts']),
108107
'image' => $data['docker_image'] ?? $server->image,

tests/Integration/Services/Servers/StartupModificationServiceTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ public function testServerIsProperlyModifiedAsAdminUser()
9696
$this->assertSame('sample startup', $response->startup);
9797
$this->assertSame('docker/hodor', $response->image);
9898
$this->assertTrue($response->skip_scripts);
99+
// Make sure we don't revert back to a lurking bug that causes servers to get marked
100+
// as not installed when you modify the startup...
101+
$this->assertSame(1, $response->installed);
99102
}
100103

101104
/**

0 commit comments

Comments
 (0)