packages.js
function (path, errorMessage) {
  if (!shell.test('-e', path)) {
    shell.echo('Error: ' + errorMessage);
    shell.exit(1);
  }
}
function (path, errorMessage) {
  if (!shell.test('-e', path)) {
    shell.echo('Error: ' + errorMessage);
    shell.exit(1);
  }
}
function ( path , errorMessage ) { if ( ! shell . test ( '-e' , path ) ) { shell . echo ( 'Error: ' + errorMessage ) ; shell . exit ( 1 ) ; } }
Test if path exists and fail with error if it is not exists
Test if path exists and fail with error if it is not exists