mirror of
https://github.com/actions/setup-python.git
synced 2025-12-17 05:52:37 +00:00
Extend PKG_CONFIG path rather than overwriting it
This commit is contained in:
parent
cfd55ca824
commit
87c35f43f0
5 changed files with 51 additions and 5 deletions
|
|
@ -307,6 +307,32 @@ describe('findPyPyVersion', () => {
|
|||
).rejects.toThrow();
|
||||
});
|
||||
|
||||
it('update PKG_CONFIG_PATH', async () => {
|
||||
process.env['PKG_CONFIG_PATH'] = '/test/dir';
|
||||
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
||||
spyCacheDir.mockImplementation(() =>
|
||||
path.join(toolDir, 'PyPy', '3.7.7', architecture)
|
||||
);
|
||||
spyChmodSync = jest.spyOn(fs, 'chmodSync');
|
||||
spyChmodSync.mockImplementation(() => undefined);
|
||||
await expect(
|
||||
finder.findPyPyVersion(
|
||||
'pypy-3.7-v7.3.x',
|
||||
architecture,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
)
|
||||
).resolves.toEqual({
|
||||
resolvedPythonVersion: '3.7.9',
|
||||
resolvedPyPyVersion: '7.3.3'
|
||||
});
|
||||
expect(spyCoreExportVariable).toHaveBeenCalledWith(
|
||||
'PKG_CONFIG_PATH',
|
||||
expect.stringContaining('/test/dir')
|
||||
);
|
||||
});
|
||||
|
||||
it('found and install successfully', async () => {
|
||||
spyCacheDir = jest.spyOn(tc, 'cacheDir');
|
||||
spyCacheDir.mockImplementation(() =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue