Skip to content

install-deps is far too brittle to use set -e #85

@mcsaucy

Description

@mcsaucy

64430c3 introduced a neat regression. If a user doesn't have a file/directory named /tmp/OpenBLAS, we will reliably fail to build OpenBLAS due to a failure to rm at https://github.com/torch/ezinstall/blob/master/install-deps#L12.

7fd56ce is just an awful hack around this behavior to keep the whole script from bailing. Basically, if anyone new tries to use install-deps, they'll never build OpenBLAS.

As a more philosophical statement, silent failure is soooo user-unfriendly. The script is still kinda janky and silent failure makes it really hard to troubleshoot. As an alternative, you could make a function that runs a command, checks the exit code, and fails with a useful error message (if you use BASH_LINENO, you can even get line numbers) if non-zero.

... As a side note, are there any tests performed for these changes?

Let me know if you have any questions,

-J

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