From f8e340e003bffe25affde3322845b7d792beebad Mon Sep 17 00:00:00 2001 From: giriparus Date: Thu, 20 Jun 2024 16:46:28 +0530 Subject: [PATCH 1/2] Add disconnect command to cleanup --- lib/setup-cloudflare-warp.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/setup-cloudflare-warp.js b/lib/setup-cloudflare-warp.js index 9e2ea5a..1048ea0 100644 --- a/lib/setup-cloudflare-warp.js +++ b/lib/setup-cloudflare-warp.js @@ -164,9 +164,13 @@ export async function run() { export async function cleanup() { switch (process.platform) { case "linux": + await exec.exec("warp-cli disconnect"); await exec.exec("sudo rm /var/lib/cloudflare-warp/mdm.xml"); break; case "darwin": + await exec.exec( + 'warp-cli disconnect', + ); await exec.exec( 'sudo rm "/Library/Managed Preferences/com.cloudflare.warp.plist"', ); From 08ea2921d1b766634a730f0edc3dd5f88474ce2a Mon Sep 17 00:00:00 2001 From: Francis Chuang Date: Fri, 21 Jun 2024 08:35:51 +1000 Subject: [PATCH 2/2] Fix disconnect command --- lib/setup-cloudflare-warp.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/setup-cloudflare-warp.js b/lib/setup-cloudflare-warp.js index 1048ea0..ed3289b 100644 --- a/lib/setup-cloudflare-warp.js +++ b/lib/setup-cloudflare-warp.js @@ -162,15 +162,12 @@ export async function run() { } export async function cleanup() { + await exec.exec("warp-cli", ["--accept-tos", "disconnect"]); switch (process.platform) { case "linux": - await exec.exec("warp-cli disconnect"); await exec.exec("sudo rm /var/lib/cloudflare-warp/mdm.xml"); break; case "darwin": - await exec.exec( - 'warp-cli disconnect', - ); await exec.exec( 'sudo rm "/Library/Managed Preferences/com.cloudflare.warp.plist"', );