diff --git a/__tests__/install.test.ts b/__tests__/install.test.ts index 5c272af2..45119282 100644 --- a/__tests__/install.test.ts +++ b/__tests__/install.test.ts @@ -20,6 +20,9 @@ jest.mock('../src/install', () => ({ } let script = 'initial script ' + filename + version + os_version; + if (tools_csv) { + script += 'add_tool'; + } if (extension_csv) { script += 'install extensions'; } @@ -29,9 +32,6 @@ jest.mock('../src/install', () => ({ if (coverage_driver) { script += 'set coverage driver'; } - if (tools_csv) { - script += 'add_tool'; - } return script; } diff --git a/dist/index.js b/dist/index.js index 8d996a67..ffe43f67 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2042,6 +2042,7 @@ function build(filename, version, os_version) { tools_csv = 'pecl, ' + tools_csv; } let script = yield utils.readScript(filename, version, os_version); + script += yield tools.addTools(tools_csv, os_version); if (extension_csv) { script += yield extensions.addExtension(extension_csv, version, os_version); } @@ -2051,7 +2052,6 @@ function build(filename, version, os_version) { if (coverage_driver) { script += yield coverage.addCoverage(coverage_driver, version, os_version); } - script += yield tools.addTools(tools_csv, os_version); return yield utils.writeScript(filename, script); }); } diff --git a/src/install.ts b/src/install.ts index eccc25d7..cfaadf74 100644 --- a/src/install.ts +++ b/src/install.ts @@ -34,6 +34,8 @@ export async function build( } let script: string = await utils.readScript(filename, version, os_version); + script += await tools.addTools(tools_csv, os_version); + if (extension_csv) { script += await extensions.addExtension(extension_csv, version, os_version); } @@ -43,7 +45,6 @@ export async function build( if (coverage_driver) { script += await coverage.addCoverage(coverage_driver, version, os_version); } - script += await tools.addTools(tools_csv, os_version); return await utils.writeScript(filename, script); }