mirror of
				https://gitea.com/actions/cache.git
				synced 2025-11-02 07:47:08 +00:00 
			
		
		
		
	Fix format
This commit is contained in:
		@@ -14,7 +14,9 @@ import * as utils from "./utils/actionUtils";
 | 
				
			|||||||
// throw an uncaught exception.  Instead of failing this action, just warn.
 | 
					// throw an uncaught exception.  Instead of failing this action, just warn.
 | 
				
			||||||
process.on("uncaughtException", e => utils.logWarning(e.message));
 | 
					process.on("uncaughtException", e => utils.logWarning(e.message));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
 | 
					export async function saveImpl(
 | 
				
			||||||
 | 
					    stateProvider: IStateProvider
 | 
				
			||||||
 | 
					): Promise<number | void> {
 | 
				
			||||||
    let cacheId = -1;
 | 
					    let cacheId = -1;
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
        if (!utils.isCacheFeatureAvailable()) {
 | 
					        if (!utils.isCacheFeatureAvailable()) {
 | 
				
			||||||
@@ -76,7 +78,9 @@ export async function saveImpl(stateProvider: IStateProvider): Promise<number |
 | 
				
			|||||||
    return cacheId;
 | 
					    return cacheId;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export async function saveOnlyRun(earlyExit?: boolean | undefined): Promise<void> {
 | 
					export async function saveOnlyRun(
 | 
				
			||||||
 | 
					    earlyExit?: boolean | undefined
 | 
				
			||||||
 | 
					): Promise<void> {
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
        const cacheId = await saveImpl(new NullStateProvider());
 | 
					        const cacheId = await saveImpl(new NullStateProvider());
 | 
				
			||||||
        if (cacheId === -1) {
 | 
					        if (cacheId === -1) {
 | 
				
			||||||
@@ -118,4 +122,3 @@ export async function saveRun(earlyExit?: boolean | undefined): Promise<void> {
 | 
				
			|||||||
        process.exit(0);
 | 
					        process.exit(0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,3 @@
 | 
				
			|||||||
import { saveOnlyRun } from "./saveImpl";
 | 
					import { saveOnlyRun } from "./saveImpl";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
saveOnlyRun(true);
 | 
					saveOnlyRun(true);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user