cdisc-org / cdisc-rules-engine

Open source offering of the cdisc rules engine
MIT License
46 stars 12 forks source link

Error in the logic of the list_ct command #610

Open lexjansen opened 7 months ago

lexjansen commented 7 months ago

The list_ct command uses this logic for listing CT:

    for file in os.listdir(cache_path):
        file_prefix = file.split("-")[0]
        if file_prefix.endswith("ct") and (not subsets or file_prefix in subsets):
            print(os.path.splitext(file)[0])

This will not find Define-XML CT packages, since those have a "-" in the package name: define-xmlct-2023-12-15. This logic seems to work:

    for file in os.listdir(cache_path):
        file_prefix = file[0:file.find('ct-')+2]
        if file_prefix.endswith("ct") and (not subsets or file_prefix in subsets):
            print(os.path.splitext(file)[0])