packages/core/lib/misc/conditions.js
function({options}, succeed, skip) {
    var ssh;
    // SSH connection
    ssh = this.ssh(options.ssh);
    return each(options.should_exist).call(function(should_exist, next) {
      return fs.exists(ssh, should_exist, function(err, exists) {
        if (exists) {
          return next();
        } else {
          return next(Error(`File does not exist: ${should_exist}`));
        }
      });
    }).error(skip).next(succeed);
  }
function({options}, succeed, skip) {
    var ssh;
    // SSH connection
    ssh = this.ssh(options.ssh);
    return each(options.should_exist).call(function(should_exist, next) {
      return fs.exists(ssh, should_exist, function(err, exists) {
        if (exists) {
          return next();
        } else {
          return next(Error(`File does not exist: ${should_exist}`));
        }
      });
    }).error(skip).next(succeed);
  }
function ( { options } , succeed , skip ) { var ssh ; // SSH connection ssh = this . ssh ( options . ssh ) ; return each ( options . should_exist ) . call ( function ( should_exist , next ) { return fs . exists ( ssh , should_exist , function ( err , exists ) { if ( exists ) { return next ( ) ; } else { return next ( Error ( ` ${ should_exist } ` ) ) ; } } ) ; } ) . error ( skip ) . next ( succeed ) ; }
The callback `succeed` is called if all of the provided paths exists otherwise the callback `skip` is called with an error.
The callback succeed is called if all of the provided paths exists otherwise the callback skip is called with an error .