export function setupCleanupOnExit(cssPath: string) {
  if (!hasSetupCleanupOnExit){
    process.on('SIGINT', () => {
      console.log('Exiting, running CSS cleanup');

      fs.lstat(cssPath, (error: Error, stats: fs.Stats): void => {
        if (stats.isDirectory) {
          exec(`rm -r ${cssPath}`, function(error) {
            if (error) {
              console.error(error);
              process.exit(1);
            }
    
            console.log('Deleted CSS files');
          });
        }
        else {
          console.error('Could not delete CSS files because the given path is not a directory:', cssPath);
          process.exit(1);
        }
      });
  
      hasSetupCleanupOnExit = true;        
    });
  }
}
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.