MCPcopy Index your code
hub / github.com/actions/setup-python / installPython

Function installPython

src/install-python.ts:183–206  ·  view source on GitHub ↗
(workingDirectory: string)

Source from the content-addressed store, hash-verified

181}
182
183async function installPython(workingDirectory: string) {
184 const options: ExecOptions = {
185 cwd: workingDirectory,
186 env: {
187 ...process.env,
188 ...(IS_LINUX && {LD_LIBRARY_PATH: path.join(workingDirectory, 'lib')})
189 },
190 silent: true,
191 listeners: {
192 stdout: (data: Buffer) => {
193 core.info(data.toString().trim());
194 },
195 stderr: (data: Buffer) => {
196 core.error(data.toString().trim());
197 }
198 }
199 };
200
201 if (IS_WINDOWS) {
202 await exec.exec('powershell', ['./setup.ps1'], options);
203 } else {
204 await exec.exec('bash', ['./setup.sh'], options);
205 }
206}
207
208export async function installCpythonFromRelease(release: tc.IToolRelease) {
209 if (!release.files || release.files.length === 0) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected