Skip to content

Commit

Permalink
Handle being killed with Ctrl+C
Browse files Browse the repository at this point in the history
This prevents the process printing an annoying message to the console.
  • Loading branch information
TomasHubelbauer committed Jun 3, 2024
1 parent 94a73b2 commit af47b8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import fs from 'fs';
import askSpotify from './askSpotify.js';

electron.app.on('ready', async () => {
// Prevent "exited with signal SIGINT" to be printed to the console
// Note that this must be in the `ready` event handler
process.on("SIGINT", () => { });

/** @type {string} */
let authorization;

Expand Down

0 comments on commit af47b8f

Please sign in to comment.