mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
Remove useless await in getCacheDistributor calls
This commit is contained in:
parent
7885ec3539
commit
422c071dab
1 changed files with 7 additions and 3 deletions
|
@ -27,6 +27,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
let debugSpy: jest.SpyInstance;
|
let debugSpy: jest.SpyInstance;
|
||||||
let saveSatetSpy: jest.SpyInstance;
|
let saveSatetSpy: jest.SpyInstance;
|
||||||
let getStateSpy: jest.SpyInstance;
|
let getStateSpy: jest.SpyInstance;
|
||||||
|
let setOutputSpy: jest.SpyInstance;
|
||||||
|
|
||||||
// cache spy
|
// cache spy
|
||||||
let restoreCacheSpy: jest.SpyInstance;
|
let restoreCacheSpy: jest.SpyInstance;
|
||||||
|
@ -64,6 +65,9 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
return {stdout: '', stderr: 'Error occured', exitCode: 2};
|
return {stdout: '', stderr: 'Error occured', exitCode: 2};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setOutputSpy = jest.spyOn(core, 'setOutput');
|
||||||
|
setOutputSpy.mockImplementation(input => undefined);
|
||||||
|
|
||||||
restoreCacheSpy = jest.spyOn(cache, 'restoreCache');
|
restoreCacheSpy = jest.spyOn(cache, 'restoreCache');
|
||||||
restoreCacheSpy.mockImplementation(
|
restoreCacheSpy.mockImplementation(
|
||||||
(cachePaths: string[], primaryKey: string, restoreKey?: string) => {
|
(cachePaths: string[], primaryKey: string, restoreKey?: string) => {
|
||||||
|
@ -100,7 +104,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
])(
|
])(
|
||||||
'restored dependencies for %s by primaryKey',
|
'restored dependencies for %s by primaryKey',
|
||||||
async (packageManager, pythonVersion, dependencyFile, fileHash) => {
|
async (packageManager, pythonVersion, dependencyFile, fileHash) => {
|
||||||
const cacheDistributor = await getCacheDistributor(
|
const cacheDistributor = getCacheDistributor(
|
||||||
packageManager,
|
packageManager,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
dependencyFile
|
dependencyFile
|
||||||
|
@ -126,7 +130,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
dependencyFile,
|
dependencyFile,
|
||||||
cacheDependencyPath
|
cacheDependencyPath
|
||||||
) => {
|
) => {
|
||||||
const cacheDistributor = await getCacheDistributor(
|
const cacheDistributor = getCacheDistributor(
|
||||||
packageManager,
|
packageManager,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
dependencyFile
|
dependencyFile
|
||||||
|
@ -162,7 +166,7 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
return primaryKey !== fileHash && restoreKey ? pipFileLockHash : '';
|
return primaryKey !== fileHash && restoreKey ? pipFileLockHash : '';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const cacheDistributor = await getCacheDistributor(
|
const cacheDistributor = getCacheDistributor(
|
||||||
packageManager,
|
packageManager,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
dependencyFile
|
dependencyFile
|
||||||
|
|
Loading…
Add table
Reference in a new issue