8000 Train needs more robust stat functionality on Linux · Issue #686 · inspec/train · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Train needs more robust stat functionality on Linux #686
Open
@tas50

Description

@tas50

The current implementation of Stat functionality for Linux in Train is not robust enough to hand new / unknown linux variants.

There is logic at this line to determine if we should use --printf or -c when running the command:

format = (backend.os.esx? || backend.os[:name] == "alpine" || backend.os[:name] == "yocto") ? "-c" : "--printf"

This relies on a hard coded list of distros that need -c, which does not work when we encounter a new distro. It's made worse since the failures that occur here are not clear and you'd have to spend the time digging into train to fully understand where the stat command is failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Mileston 3022 e

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0