mirror of
				https://github.com/actions/setup-go.git
				synced 2025-10-31 23:43:41 +00:00 
			
		
		
		
	Update isSelfHosted logic
This commit is contained in:
		
							parent
							
								
									a5bc5249cb
								
							
						
					
					
						commit
						b20f2f5048
					
				
							
								
								
									
										12
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							| @ -96642,15 +96642,15 @@ var StableReleaseAlias; | ||||
|     StableReleaseAlias["Stable"] = "stable"; | ||||
|     StableReleaseAlias["OldStable"] = "oldstable"; | ||||
| })(StableReleaseAlias || (exports.StableReleaseAlias = StableReleaseAlias = {})); | ||||
| const isSelfHosted = () => process.env['AGENT_ISSELFHOSTED'] === '1' || | ||||
|     (process.env['AGENT_ISSELFHOSTED'] === undefined && | ||||
|         process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted'); | ||||
| const isSelfHosted = () => process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && | ||||
|     (process.env['AGENT_ISSELFHOSTED'] === '1' || | ||||
|         process.env['AGENT_ISSELFHOSTED'] === undefined); | ||||
| exports.isSelfHosted = isSelfHosted; | ||||
| /* the above is simplified from: | ||||
|     process.env['RUNNER_ENVIRONMENT'] === undefined && process.env['AGENT_ISSELFHOSTED'] === '1' | ||||
|     process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1' | ||||
|     || | ||||
|     process.env['AGENT_ISSELFHOSTED'] === undefined && process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' | ||||
|      */ | ||||
|     process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined | ||||
| */ | ||||
| 
 | ||||
| 
 | ||||
| /***/ }), | ||||
|  | ||||
							
								
								
									
										12
									
								
								src/utils.ts
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/utils.ts
									
									
									
									
									
								
							| @ -4,11 +4,11 @@ export enum StableReleaseAlias { | ||||
| } | ||||
| 
 | ||||
| export const isSelfHosted = (): boolean => | ||||
|   process.env['AGENT_ISSELFHOSTED'] === '1' || | ||||
|   (process.env['AGENT_ISSELFHOSTED'] === undefined && | ||||
|     process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted'); | ||||
|   process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && | ||||
|   (process.env['AGENT_ISSELFHOSTED'] === '1' || | ||||
|     process.env['AGENT_ISSELFHOSTED'] === undefined); | ||||
| /* the above is simplified from: | ||||
|     process.env['RUNNER_ENVIRONMENT'] === undefined && process.env['AGENT_ISSELFHOSTED'] === '1' | ||||
|     process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1' | ||||
|     || | ||||
|     process.env['AGENT_ISSELFHOSTED'] === undefined && process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' | ||||
|      */ | ||||
|     process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined | ||||
| */ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user