Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
fix: kill Java after build to prevent EBUSY
Browse files Browse the repository at this point in the history
Resolves #679
Resolves #684
Resolves #689
  • Loading branch information
shrihankp committed Apr 18, 2023
1 parent 4960c4a commit c2707da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wsEvents/patchApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const exec = require('../utils/promisifiedExec.js');

const mountReVanced = require('../utils/mountReVanced.js');

const fkill = require('fkill');

/**
* @param {import('ws').WebSocket} ws
*/
Expand All @@ -25,6 +27,8 @@ async function mount(ws) {
* @param {import('ws').WebSocket} ws
*/
async function afterBuild(ws) {
// HACK: Kill Java after build is done to prevent EBUSY errors while deleting the cache
await fkill('java', { forceAfterTimeout: 5000, silent: true });
rmSync('revanced-cache', { recursive: true, force: true });
outputName();
renameSync(
Expand Down

1 comment on commit c2707da

@Razuuu
Copy link

@Razuuu Razuuu commented on c2707da May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this affect other Java applikation running outside RV builder?

Please sign in to comment.