How to use the just-scripts.logger.error function in just-scripts

To help you get started, we’ve selected a few just-scripts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OfficeDev / office-ui-fabric-react / scripts / tasks / check-for-modified-files.js View on Github external
module.exports = function checkForModifiedFiles() {
  const EOL = require('os').EOL;
  const execSync = require('child_process').execSync;
  const notEmpty = value => value.trim() !== '';

  const gitStatusOutput = execSync('git status -s --untracked-files=no').toString('utf8');
  const hasChangedFiles = gitStatusOutput.split(EOL).filter(notEmpty).length > 0;

  if (hasChangedFiles) {
    logger.error('This build has files that are tracked by git that resulted in changed files.');
    logger.error('Check the following output and resolve the problem that caused these files to change');
    logger.error('Most likely you committed your files with --no-verify');
    logger.error(gitStatusOutput);

    logger.error(execSync('git diff').toString('utf8'));

    throw new Error('change file is required');
  }
};
github OfficeDev / office-ui-fabric-react / scripts / tasks / check-for-modified-files.js View on Github external
module.exports = function checkForModifiedFiles() {
  const EOL = require('os').EOL;
  const execSync = require('child_process').execSync;
  const notEmpty = value => value.trim() !== '';

  const gitStatusOutput = execSync('git status -s --untracked-files=no').toString('utf8');
  const hasChangedFiles = gitStatusOutput.split(EOL).filter(notEmpty).length > 0;

  if (hasChangedFiles) {
    logger.error('This build has files that are tracked by git that resulted in changed files.');
    logger.error('Check the following output and resolve the problem that caused these files to change');
    logger.error('Most likely you committed your files with --no-verify');
    logger.error(gitStatusOutput);

    logger.error(execSync('git diff').toString('utf8'));

    throw new Error('change file is required');
  }
};
github OfficeDev / office-ui-fabric-react / scripts / tasks / check-for-modified-files.js View on Github external
module.exports = function checkForModifiedFiles() {
  const EOL = require('os').EOL;
  const execSync = require('child_process').execSync;
  const notEmpty = value => value.trim() !== '';

  const gitStatusOutput = execSync('git status -s --untracked-files=no').toString('utf8');
  const hasChangedFiles = gitStatusOutput.split(EOL).filter(notEmpty).length > 0;

  if (hasChangedFiles) {
    logger.error('This build has files that are tracked by git that resulted in changed files.');
    logger.error('Check the following output and resolve the problem that caused these files to change');
    logger.error('Most likely you committed your files with --no-verify');
    logger.error(gitStatusOutput);

    logger.error(execSync('git diff').toString('utf8'));

    throw new Error('change file is required');
  }
};
github OfficeDev / office-ui-fabric-react / scripts / tasks / check-for-modified-files.js View on Github external
module.exports = function checkForModifiedFiles() {
  const EOL = require('os').EOL;
  const execSync = require('child_process').execSync;
  const notEmpty = value => value.trim() !== '';

  const gitStatusOutput = execSync('git status -s --untracked-files=no').toString('utf8');
  const hasChangedFiles = gitStatusOutput.split(EOL).filter(notEmpty).length > 0;

  if (hasChangedFiles) {
    logger.error('This build has files that are tracked by git that resulted in changed files.');
    logger.error('Check the following output and resolve the problem that caused these files to change');
    logger.error('Most likely you committed your files with --no-verify');
    logger.error(gitStatusOutput);

    logger.error(execSync('git diff').toString('utf8'));

    throw new Error('change file is required');
  }
};
github OfficeDev / office-ui-fabric-react / scripts / tasks / check-for-modified-files.js View on Github external
module.exports = function checkForModifiedFiles() {
  const EOL = require('os').EOL;
  const execSync = require('child_process').execSync;
  const notEmpty = value => value.trim() !== '';

  const gitStatusOutput = execSync('git status -s --untracked-files=no').toString('utf8');
  const hasChangedFiles = gitStatusOutput.split(EOL).filter(notEmpty).length > 0;

  if (hasChangedFiles) {
    logger.error('This build has files that are tracked by git that resulted in changed files.');
    logger.error('Check the following output and resolve the problem that caused these files to change');
    logger.error('Most likely you committed your files with --no-verify');
    logger.error(gitStatusOutput);

    logger.error(execSync('git diff').toString('utf8'));

    throw new Error('change file is required');
  }
};