thrownewError(`Directory '${path}' does not exist`);
}
thrownewError(`Encountered an error when checking whether path '${path}' exists: ${(_c=(_b=error)===null||_b===void0?void0:_b.message)!==null&&_c!==void0?_c:error}`);
}
if(stats.isDirectory()){
returntrue;
}
elseif(!required){
returnfalse;
}
thrownewError(`Directory '${path}' does not exist`);
thrownewError(`Encountered an error when checking whether path '${path}' exists: ${(_c=(_b=error)===null||_b===void0?void0:_b.message)!==null&&_c!==void0?_c:error}`);
thrownewError(`Encountered an error when checking whether path '${path}' exists: ${(_c=(_b=error)===null||_b===void0?void0:_b.message)!==null&&_c!==void0?_c:error}`);
thrownewError(`Minimum Git version required for sparse checkout is ${minimumGitSparseCheckoutVersion}. Your git ('${this.gitPath}') is ${gitVersion}`);
core.debug(`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For further investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`);
core.info(`The repository will be downloaded using the GitHub REST API`);
core.info(`To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH`);
if(settings.submodules){
thrownewError(`Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`);
}
elseif(settings.sshKey){
thrownewError(`Input 'ssh-key' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git ${gitCommandManager.MinimumGitVersion} or higher to the PATH.`);
// Note: Be careful editing this code! It's been tuned for performance
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
constuuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+'-'+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+'-'+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+'-'+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+'-'+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();// Consistency check for valid UUID. If this throws, it's likely due to one
// of the following:
// - One or more input array values don't map to a hex octet (leading to
// "undefined" in the uuid)
// - Invalid input values for the RFC `version` or `variant` fields
error=newError(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);
// if there's no location to redirect to, we won't
break;
}
constparsedRedirectUrl=newURL(redirectUrl);
if(parsedUrl.protocol==='https:'&&
parsedUrl.protocol!==parsedRedirectUrl.protocol&&
!this._allowRedirectDowngrade){
thrownewError('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
}
// we need to finish reading the response before reassigning response
// which will leak the open socket.
yieldresponse.readBody();
// strip authorization header if redirected to a different hostname
thrownewError(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`);
}
else{
thrownewError(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
this.hook=hook;// (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
// is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.
// (2) If only `options.auth` is set, use the default token authentication strategy.
// (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.
// TODO: type `options.auth` based on `options.authStrategy`.
letparameters=omit(options,["method","baseUrl","url","headers","request","mediaType"]);// extract variable names from URL to calculate remaining variables later
constuserAgent=`octokit-endpoint.js/${VERSION}${universalUserAgent.getUserAgent()}`;// DEFAULTS has all properties set that EndpointOptions has, except url.
// So we use RequestParameters and add method as additional required property.
log.warn(`[@octokit/request] "${requestOptions.method}${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink?`. See ${deprecationLink}`:""}`);
thrownewError("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");