Merge pull request #1926 from github/mbg/suppress-go-workaround-warning
Suppress Go workaround warning if autobuilder ran
This commit is contained in:
commit
faf91ca6bd
3 changed files with 7 additions and 3 deletions
3
lib/analyze-action.js
generated
3
lib/analyze-action.js
generated
|
|
@ -166,7 +166,8 @@ async function run() {
|
|||
// in the workflow after the `init` step which installs a different version of Go and takes
|
||||
// precedence in the PATH, thus potentially circumventing our workaround that allows tracing to work.
|
||||
const goWrapperPath = process.env[environment_1.EnvVar.GO_BINARY_LOCATION];
|
||||
if (goWrapperPath !== undefined) {
|
||||
if (process.env[environment_1.EnvVar.DID_AUTOBUILD_GOLANG] !== "true" &&
|
||||
goWrapperPath !== undefined) {
|
||||
const goBinaryPath = await (0, safe_which_1.safeWhich)("go");
|
||||
if (goWrapperPath !== goBinaryPath) {
|
||||
core.warning(`Expected \`which go\` to return ${goWrapperPath}, but got ${goBinaryPath}: please ensure that the correct version of Go is installed before the \`codeql-action/init\` Action is used.`);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -239,7 +239,10 @@ async function run() {
|
|||
// precedence in the PATH, thus potentially circumventing our workaround that allows tracing to work.
|
||||
const goWrapperPath = process.env[EnvVar.GO_BINARY_LOCATION];
|
||||
|
||||
if (goWrapperPath !== undefined) {
|
||||
if (
|
||||
process.env[EnvVar.DID_AUTOBUILD_GOLANG] !== "true" &&
|
||||
goWrapperPath !== undefined
|
||||
) {
|
||||
const goBinaryPath = await safeWhich("go");
|
||||
|
||||
if (goWrapperPath !== goBinaryPath) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue