# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
from ..supply_editor import LinkBreaker
from ..common_tools import running_on_ci


def break_link(proj):
    if not proj.open_mode:
        proj.show_message_no_supply()
        return
    res = LinkBreaker(proj)
    if running_on_ci():
        return res
    res.do_break_link()
