Skip to content

Why use "which" to check existed file?  #358

@wzhen12

Description

@wzhen12

./runtests -f sdsi/tests
==> /tmp/stderr <==
|0816_074419.075|ERROR| common.sh:155:block_test() - block_test() is called by common.sh:571:check_fms_list()|
|0816_074419.077|ERROR| common.sh:156:block_test() - Result ====BLOCK==== : No family model stepping list file:sdsi_fms_list found|

The function of check_fms_list is in common.sh for checking existed files.
$fms_list_file is the existed file.
"
list_file=$(which "$fms_list_file" 2>/dev/null)
[[ -n "$list_file" ]] || block_test "No family model stepping list file:$fms_list_file found"
"
Why use "which" to check the existed file of "$fms_list_file"?
It should get the not right results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions