mirror of
				https://github.com/actions/checkout.git
				synced 2025-10-31 07:30:32 +00:00 
			
		
		
		
	.
This commit is contained in:
		| @@ -18,8 +18,9 @@ export function directoryExistsSync(path: string, required?: boolean): boolean { | ||||
|     } | ||||
|  | ||||
|     throw new Error( | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${(error as any) | ||||
|         ?.message ?? error}` | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${ | ||||
|         (error as any)?.message ?? error | ||||
|       }` | ||||
|     ) | ||||
|   } | ||||
|  | ||||
| @@ -45,8 +46,9 @@ export function existsSync(path: string): boolean { | ||||
|     } | ||||
|  | ||||
|     throw new Error( | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${(error as any) | ||||
|         ?.message ?? error}` | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${ | ||||
|         (error as any)?.message ?? error | ||||
|       }` | ||||
|     ) | ||||
|   } | ||||
|  | ||||
| @@ -67,8 +69,9 @@ export function fileExistsSync(path: string): boolean { | ||||
|     } | ||||
|  | ||||
|     throw new Error( | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${(error as any) | ||||
|         ?.message ?? error}` | ||||
|       `Encountered an error when checking whether path '${path}' exists: ${ | ||||
|         (error as any)?.message ?? error | ||||
|       }` | ||||
|     ) | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -49,7 +49,7 @@ class GitAuthHelper { | ||||
|     gitSourceSettings: IGitSourceSettings | undefined | ||||
|   ) { | ||||
|     this.git = gitCommandManager | ||||
|     this.settings = gitSourceSettings || (({} as unknown) as IGitSourceSettings) | ||||
|     this.settings = gitSourceSettings || ({} as unknown as IGitSourceSettings) | ||||
|  | ||||
|     // Token auth header | ||||
|     const serverUrl = urlHelper.getServerUrl(this.settings.githubServerUrl) | ||||
|   | ||||
| @@ -6,7 +6,7 @@ import * as workflowContextHelper from './workflow-context-helper' | ||||
| import {IGitSourceSettings} from './git-source-settings' | ||||
|  | ||||
| export async function getInputs(): Promise<IGitSourceSettings> { | ||||
|   const result = ({} as unknown) as IGitSourceSettings | ||||
|   const result = {} as unknown as IGitSourceSettings | ||||
|  | ||||
|   // GitHub workspace | ||||
|   let githubWorkspacePath = process.env['GITHUB_WORKSPACE'] | ||||
| @@ -149,7 +149,8 @@ export async function getInputs(): Promise<IGitSourceSettings> { | ||||
|     (core.getInput('persist-credentials') || 'false').toUpperCase() === 'TRUE' | ||||
|  | ||||
|   // Workflow organization ID | ||||
|   result.workflowOrganizationId = await workflowContextHelper.getOrganizationId() | ||||
|   result.workflowOrganizationId = | ||||
|     await workflowContextHelper.getOrganizationId() | ||||
|  | ||||
|   // Set safe.directory in git global config. | ||||
|   result.setSafeDirectory = | ||||
|   | ||||
| @@ -23,7 +23,7 @@ export async function getCheckoutInfo( | ||||
|     throw new Error('Args ref and commit cannot both be empty') | ||||
|   } | ||||
|  | ||||
|   const result = ({} as unknown) as ICheckoutInfo | ||||
|   const result = {} as unknown as ICheckoutInfo | ||||
|   const upperRef = (ref || '').toUpperCase() | ||||
|  | ||||
|   // SHA only | ||||
|   | ||||
| @@ -23,8 +23,9 @@ export async function getOrganizationId(): Promise<number | undefined> { | ||||
|     return id as number | ||||
|   } catch (err) { | ||||
|     core.debug( | ||||
|       `Unable to load organization ID from GITHUB_EVENT_PATH: ${(err as any) | ||||
|         .message || err}` | ||||
|       `Unable to load organization ID from GITHUB_EVENT_PATH: ${ | ||||
|         (err as any).message || err | ||||
|       }` | ||||
|     ) | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tatyana Kostromskaya
					Tatyana Kostromskaya