We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0db2620 commit 22adcecCopy full SHA for 22adcec
1 file changed
src/resources/ruby/rbenv/rbenv.ts
@@ -96,7 +96,9 @@ async function uninstallOnMacOS(): Promise<void> {
96
async function uninstallOnLinux(): Promise<void> {
97
const $ = getPty();
98
await $.spawnSafe(`rm -rf ${RBENV_ROOT}`);
99
- await $.spawnSafe('rm -f /usr/bin/rbenv');
+ if (await FileUtils.fileExists('/usr/bin/rbenv')) {
100
+ await $.spawn('rm -f /usr/bin/rbenv', { requiresRoot: true });
101
+ }
102
await removeRbenvFromShellRc([RBENV_PATH_EXPORT, RBENV_INIT]);
103
}
104
0 commit comments