MCPcopy Index your code
hub / github.com/actions/setup-node / getToolVersion

Function getToolVersion

src/util.ts:95–111  ·  view source on GitHub ↗
(tool: string, options: string[])

Source from the content-addressed store, hash-verified

93}
94
95async function getToolVersion(tool: string, options: string[]) {
96 try {
97 const {stdout, stderr, exitCode} = await exec.getExecOutput(tool, options, {
98 ignoreReturnCode: true,
99 silent: true
100 });
101
102 if (exitCode > 0) {
103 core.info(`[warning]${stderr}`);
104 return '';
105 }
106
107 return stdout.trim();
108 } catch (err) {
109 return '';
110 }
111}
112
113export const unique = () => {
114 const encountered = new Set();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected