Skip to content

Commit 07a7d0b

Browse files
committed
fix: log Extension.name, not the object itself
electron-devtools-installer v3's installExtension resolved to a string name; v4 resolves to an Electron Extension object. The success log was string-interpolating the object, producing "Installed dev extension: [object Object]". The install itself was working; only the log message was wrong. Read `.name` off the returned Extension instead.
1 parent efdcb73 commit 07a7d0b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ app.on('ready', () => {
431431
// WARNING: depending on a lot of things including the version of Electron `installExtension` might
432432
// return a promise that never resolves, especially if the extension is already installed.
433433
installExtension(extension).then(
434-
extensionName => log(`Installed dev extension: ${extensionName}`),
434+
// v3 resolved with a string name; v4 resolves with an Electron
435+
// Extension object. Read `.name` rather than relying on toString.
436+
installed => log(`Installed dev extension: ${installed.name}`),
435437
errorMessage => log.error(`Error installing dev extension: ${errorMessage}`)
436438
);
437439
}

0 commit comments

Comments
 (0)