mirror of
				https://github.com/actions/cache.git
				synced 2025-10-31 20:08:36 +08:00 
			
		
		
		
	Correct cachePath to be a direct output, not a state
This commit is contained in:
		
							parent
							
								
									b3f0756597
								
							
						
					
					
						commit
						9806e2f37f
					
				
							
								
								
									
										6
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								dist/restore-only/index.js
									
									
									
									
										vendored
									
									
								
							|  | @ -59337,7 +59337,6 @@ var State; | ||||||
| (function (State) { | (function (State) { | ||||||
|     State["CachePrimaryKey"] = "CACHE_KEY"; |     State["CachePrimaryKey"] = "CACHE_KEY"; | ||||||
|     State["CacheMatchedKey"] = "CACHE_RESULT"; |     State["CacheMatchedKey"] = "CACHE_RESULT"; | ||||||
|     State["CachePath"] = "CACHE_PATH"; |  | ||||||
| })(State = exports.State || (exports.State = {})); | })(State = exports.State || (exports.State = {})); | ||||||
| var Events; | var Events; | ||||||
| (function (Events) { | (function (Events) { | ||||||
|  | @ -59411,7 +59410,7 @@ function restoreImpl(stateProvider, earlyExit) { | ||||||
|             const restoreKeys = utils.getInputAsArray(constants_1.Inputs.RestoreKeys); |             const restoreKeys = utils.getInputAsArray(constants_1.Inputs.RestoreKeys); | ||||||
| 
 | 
 | ||||||
|             // Output the inputted path unchanged
 |             // Output the inputted path unchanged
 | ||||||
|             stateProvider.setState(constants_1.State.CachePath, getInput(constants_1.Inputs.Path)); |             core.setOutput(constants_1.Outputs.CachePath, core.getInput(constants_1.Inputs.Path)); | ||||||
| 
 | 
 | ||||||
|             const cachePaths = utils.getInputAsArray(constants_1.Inputs.Path, { |             const cachePaths = utils.getInputAsArray(constants_1.Inputs.Path, { | ||||||
|                 required: true |                 required: true | ||||||
|  | @ -59541,8 +59540,7 @@ class NullStateProvider extends StateProviderBase { | ||||||
|         super(...arguments); |         super(...arguments); | ||||||
|         this.stateToOutputMap = new Map([ |         this.stateToOutputMap = new Map([ | ||||||
|             [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], |             [constants_1.State.CacheMatchedKey, constants_1.Outputs.CacheMatchedKey], | ||||||
|             [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey], |             [constants_1.State.CachePrimaryKey, constants_1.Outputs.CachePrimaryKey] | ||||||
|             [constants_1.State.CachePath, constants_1.Outputs.CachePath] |  | ||||||
|         ]); |         ]); | ||||||
|         this.setState = (key, value) => { |         this.setState = (key, value) => { | ||||||
|             core.setOutput(this.stateToOutputMap.get(key), value); |             core.setOutput(this.stateToOutputMap.get(key), value); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Ella Kramer
						Ella Kramer