nicer import

This commit is contained in:
Benjamin Pasero 2018-06-20 09:47:42 +02:00
parent e585e4bf00
commit 90eefbfa87

View File

@ -929,7 +929,7 @@ export class FileService implements IFileService {
private doMoveItemToTrash(resource: uri): TPromise<void> {
const absolutePath = resource.fsPath;
const shell = (require.__$__nodeRequire('electron') as Electron.RendererInterface).shell; // workaround for being able to run tests out of VSCode debugger
const shell = (require('electron') as Electron.RendererInterface).shell; // workaround for being able to run tests out of VSCode debugger
const result = shell.moveItemToTrash(absolutePath);
if (!result) {
return TPromise.wrapError(new Error(isWindows ? nls.localize('binFailed', "Failed to move '{0}' to the recycle bin", paths.basename(absolutePath)) : nls.localize('trashFailed', "Failed to move '{0}' to the trash", paths.basename(absolutePath))));