Skip to content

q: How to distinguish Sapling from 🚂 Steam Locomotive? #597

@vegerot

Description

@vegerot

I know what you're thinking.

Wasn't April Fools a week ago?

I can assure you this Issue is no jest. We are having a problem with some tools that support Sapling where they don't work properly on systems with Steam Locomotive 🚂 (also called sl).

My question is: how can we distinguish between systems that have Sapling installed or 🚂 ?

ideas:

  • sl --version shows "Sapling ..." 🚂 --version just shows the 🚂
  • check man sl inconsistent, not portable with Windows
  • set a timeout on commands invoking sl slow
  • walk up the directory tree and look for .sl directory before invoking sl. Maybe, but this is slow
  • check binary sizes. Sapling is 50Mb and 🚂 is 34k. We can simply check if sl > 1Mb

I like the last solution best, but would need to resolve symlinks, etc.

🤡

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