vscode-vibrancy-continued icon indicating copy to clipboard operation
vscode-vibrancy-continued copied to clipboard

Use @vscode/sudo-prompt to make vscode run without admin.

Open frg2089 opened this issue 1 year ago • 6 comments

Hi, we can use this package to make the extension to run as admin when need. It can make this extension run without admin vscode.

@vscode/sudo-prompt

frg2089 avatar Sep 06 '22 00:09 frg2089

Are you going to update the extension yet? I hate having to run as admin every time..

bigplayer-ai avatar Jan 21 '23 19:01 bigplayer-ai

Are you going to update the extension yet? I hate having to run as admin every time..

Haven't had the time to test #24 as the changes are quite extensive, but I'll try to get around to testing and hopefully merging it next week.

illixion avatar Jan 22 '23 15:01 illixion

Are you going to update the extension yet? I hate having to run as admin every time..

Haven't had the time to test #24 as the changes are quite extensive, but I'll try to get around to testing and hopefully merging it next week.

#24 doesn't fit. It changed too many things that don't actually help for this project.

In fact, we just need to rewrite the write file logic with this part in our project.

import * as sudoPrompt from '@vscode/sudo-prompt'

const sudo = async (
  cmd: string,
  name?: string
): Promise<{
  stdout: string | Buffer | undefined,
  stderr: string | Buffer | undefined
}> => new Promise((resolve, reject) =>
    sudoPrompt.exec(cmd, { name }, (err, stdout, stderr) => {
      if (err)
        reject(err)
      else
        resolve({ stdout, stderr })
    })
  )

frg2089 avatar Jan 26 '23 05:01 frg2089

Hey, I still need to enter vscode as admin to enable vscode vibrancy.

bigplayer-ai avatar Feb 06 '23 20:02 bigplayer-ai

if you fix this issue, It would be much easier for a novice like me to implement extra features for this project/repo. (Like auto dark mode).

bigplayer-ai avatar Feb 18 '23 16:02 bigplayer-ai

This shouldn't impede your process if you reinstall VSCode to be a user installation.

I've tried looking into this also, but didn't have much success, Windows would give me an "operation not permitted" error when trying to copy the runtime files with admin permissions. If anyone wants to submit a PR with a solution that works, that would be much appreciated.

illixion avatar Feb 19 '23 09:02 illixion