Skip to content

Commit

Permalink
Merge pull request #1856 from headlamp-k8s/fix-watching-plugin-changes
Browse files Browse the repository at this point in the history
headlamp-plugin: Do not exit process when watching for changes
  • Loading branch information
illume authored Mar 26, 2024
2 parents fcc8a3f + 5a0f3ee commit ac01706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/headlamp-plugin/bin/headlamp-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,19 +292,19 @@ function start() {
config.mode = 'development';
process.env['BABEL_ENV'] = 'development';
copyToPluginsFolder(config);
let exitCode = 0;
webpack(config, (err, stats) => {
// We are checking the exit code of the compileMessages function.
// It should be 0 if there are no errors, and 1 if there are errors.
const exitCode = compileMessages(err, stats);
exitCode = compileMessages(err, stats);
if (exitCode !== 0) {
console.error('Failed to start watching for changes.');
} else {
console.log('Watching for changes to plugin...');
}
process.exit(exitCode);
});

return 0;
return exitCode;
}

/**
Expand Down

0 comments on commit ac01706

Please sign in to comment.