Skip to content

Commit c709277

Browse files
lmvysakhlmvysakh
andauthored
Annotation code fix (#1335)
Co-authored-by: lmvysakh <lmvysakh@github.com>
1 parent 6849080 commit c709277

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

dist/setup/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55759,7 +55759,13 @@ async function installPython(workingDirectory) {
5575955759
core.info(data.toString().trim());
5576055760
},
5576155761
stderr: (data) => {
55762-
core.error(data.toString().trim());
55762+
const msg = data.toString().trim();
55763+
if (/^WARNING:/im.test(msg)) {
55764+
core.warning(msg);
55765+
}
55766+
else {
55767+
core.error(msg);
55768+
}
5576355769
}
5576455770
}
5576555771
};

src/install-python.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@ async function installPython(workingDirectory: string) {
193193
core.info(data.toString().trim());
194194
},
195195
stderr: (data: Buffer) => {
196-
core.error(data.toString().trim());
196+
const msg = data.toString().trim();
197+
if (/^WARNING:/im.test(msg)) {
198+
core.warning(msg);
199+
} else {
200+
core.error(msg);
201+
}
197202
}
198203
}
199204
};

0 commit comments

Comments
 (0)