Skip to content

Commit 22adcec

Browse files
committed
fix added requires root
1 parent 0db2620 commit 22adcec

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/resources/ruby/rbenv/rbenv.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ async function uninstallOnMacOS(): Promise<void> {
9696
async function uninstallOnLinux(): Promise<void> {
9797
const $ = getPty();
9898
await $.spawnSafe(`rm -rf ${RBENV_ROOT}`);
99-
await $.spawnSafe('rm -f /usr/bin/rbenv');
99+
if (await FileUtils.fileExists('/usr/bin/rbenv')) {
100+
await $.spawn('rm -f /usr/bin/rbenv', { requiresRoot: true });
101+
}
100102
await removeRbenvFromShellRc([RBENV_PATH_EXPORT, RBENV_INIT]);
101103
}
102104

0 commit comments

Comments
 (0)