[Notes] [Git][BuildStream/buildstream][master] 2 commits: _yaml.py: Fix incorrect error message



Title: GitLab

Jürg Billeter pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/_yaml.py
    ... ... @@ -476,12 +476,18 @@ def node_get_project_path(node, key, project_dir, *,
    476 476
         is_inside = project_dir_path.resolve() in full_resolved_path.parents or (
    
    477 477
             full_resolved_path == project_dir_path)
    
    478 478
     
    
    479
    -    if path.is_absolute() or not is_inside:
    
    479
    +    if not is_inside:
    
    480 480
             raise LoadError(LoadErrorReason.PROJ_PATH_INVALID,
    
    481 481
                             "{}: Specified path '{}' must not lead outside of the "
    
    482 482
                             "project directory"
    
    483 483
                             .format(provenance, path_str))
    
    484 484
     
    
    485
    +    if path.is_absolute():
    
    486
    +        raise LoadError(LoadErrorReason.PROJ_PATH_INVALID,
    
    487
    +                        "{}: Absolute path: '{}' invalid.\n"
    
    488
    +                        "Please specify a path relative to the project's root."
    
    489
    +                        .format(provenance, path))
    
    490
    +
    
    485 491
         if full_resolved_path.is_socket() or (
    
    486 492
                 full_resolved_path.is_fifo() or
    
    487 493
                 full_resolved_path.is_block_device()):
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]