E

Inconsistent Earthly Command Behavior

Summary

The user describes a directory structure with a file located at /dir1/Earthfile. They note that calling Earthly with earthly dir1+test fails, while earthly ./dir1+test works. The user questions whether this behavior is intentional, as it seems inconsistent with common expectations, citing that a command like cat dir1/Earthfile is valid.

Status
resolved
Tags
  • /dir1/Earthfile
  • earthly
  • Earthly
  • Command
  • Bug
Source
#earthly
    v

    vlad

    9/3/2024

    Yes.. it's intentional. It's mainly because earthly needs to distinguish between a local disk reference (./foo/bar+something) vs URL reference (<http://foo.com/bar+something|foo.com/bar+something>) vs an import reference (IMPORT &lt;reference&gt; AS foo and then using foo+something)

    j

    joshua.gilman

    8/31/2024

    Suppose I have this directory structure:

    //dir1/Earthfile If I call Earthly with:

    earthly dir1+test It fails to evaluate the path. Only with the following does it work:

    earthly ./dir1+test Is this intentional? It seems to differ from the common expectation. For example, this is valid:

    cat dir1/Earthfile