Skip to content

Commit

Permalink
Fix update script (#165)
Browse files Browse the repository at this point in the history
The update script currently results in the following error:

"Script 'maintenance/update.php' not found (tried path '/var/www/html/w/maintenance/maintenance/update.php' and class 'maintenance/update\php')."

This commit updates the update script to avoid this error.
  • Loading branch information
Nicholas Ray authored Jan 31, 2023
1 parent 11da14e commit 4e4202b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MwCheckout.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MwCheckout {
// The final step is to run maintenance/update script to perform any
// database migrations.
await this.#batchSpawn.spawn(
'php maintenance/run.php maintenance/update.php --quick',
'php maintenance/run.php update.php --quick',
[],
{ shell: true }
);
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/MwCheckout.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe( 'MwCheckout.js', () => {

await factory.mwCheckout.checkout( 'master', [ 'I8d3af86fdc3daf42441a93fc5b64ebcef37c5fb4' ] );

expect( factory.batchSpawn.spawn ).toHaveBeenLastCalledWith( 'php maintenance/run.php maintenance/update.php --quick', expect.anything(), expect.anything() );
expect( factory.batchSpawn.spawn ).toHaveBeenLastCalledWith( 'php maintenance/run.php update.php --quick', expect.anything(), expect.anything() );
} );

it( 'throws an error when branch is not found', async () => {
Expand Down

0 comments on commit 4e4202b

Please sign in to comment.