Skip to content

Commit

Permalink
Check for target presence before adding it (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
vonZeppelin authored May 17, 2024
1 parent 2d855fb commit 48096f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def clean_microros_callback(*args, **kwargs):
print("micro-ROS library cleaned!")
os._exit(0)

global_env.AddCustomTarget("clean_microros", None, clean_microros_callback, title="Clean Micro-ROS", description="Clean Micro-ROS build environment")
if "clean_microros" not in global_env.get("__PIO_TARGETS", {}):
global_env.AddCustomTarget("clean_microros", None, clean_microros_callback, title="Clean Micro-ROS", description="Clean Micro-ROS build environment")

def build_microros(*args, **kwargs):
##############################
Expand Down

0 comments on commit 48096f8

Please sign in to comment.