Skip to content

Commit

Permalink
check if it exist first
Browse files Browse the repository at this point in the history
  • Loading branch information
TingDaoK committed Feb 20, 2024
1 parent c1667df commit 1eb95bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builder/actions/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def _build_project(env, project, cmake_extra, build_tests=False, args_transforme
config = project.get_config(env.spec)
build_env = []
toolchain = env.toolchain
if toolchain.cross_compile and env.variables['go_path'] is not None:
if toolchain.cross_compile and 'go_path' in env.variables and env.variables['go_path'] is not None:
# We need to set the envrionment variable of GO_PATH for cross compile
build_env = ["GO_PATH={}\n".format(env.variables['go_path'])]

Expand Down

0 comments on commit 1eb95bd

Please sign in to comment.