headmelted / codebuilds

Community builds of Visual Studio Code for Chromebooks and Raspberry Pi
https://code.headmelted.com
MIT License
1.03k stars 56 forks source link

cannot save as root #106

Open louisabraham opened 4 years ago

louisabraham commented 4 years ago

(moved from https://github.com/microsoft/vscode/issues/92918)

When trying to save a root file and retrying as a super user, I get the following error message:

Failed to save 'FILENAME': options.name must be alphanumeric only (spaces are allowed) and <= 70 characters.

I believe this comes from https://github.com/jorangreef/sudo-prompt

The error would be there:

https://github.com/microsoft/vscode/blob/e1d6bfe8b19eab7e4763f6dfb0e4bb5d1af9bf3f/src/vs/workbench/services/textfile/electron-browser/nativeTextFileService.ts#L289

It looks like this.productService.nameLong, defined in src/vs/platform/product/common/product.ts causes an error.

TomaszWaszczyk commented 3 years ago

Anyone has solved it?

AnasMK commented 3 years ago

Did any one find solution for this?

AnasMK commented 3 years ago

I solved this temporarily by changing the folder and content ownership to the user, using this command sudo chown -R usename: folder_name