Commit Graph

4 Commits

Author SHA1 Message Date
Casey Rodarmor
8e3f5516af
Use attractive paths in user-facing messages
If a user passes `--input foo`, print "Searching `foo` for files…",
instead of the resolved, absolute path to `foo`, since the former is
what the user typed in.

This was way harder, and had way more edge cases, than I thought it would
be!

One takaway, lexical path cleaning is excellent.

type: changed
fixes:
- https://github.com/casey/intermodal/issues/252
- https://github.com/casey/intermodal/issues/332
2020-04-07 19:37:51 -07:00
Casey Rodarmor
1cfc021453
Forbid empty input, output, and path targets
When an empty path is passed to `Env::resolve`, the result is the
current working directory. This is bad, so forbid the user to pass in
empty paths.

type: fixed
2020-04-07 19:01:43 -07:00
Eric Siegel
c23b0635ee
Add ability to create single-file torrents from stdin
Torrents may now be created from standard input by passing `--input -`.

Since `--name` and `--output` cannot be deduced, they are required when
`--input -`.

type: added
2020-04-07 19:01:43 -07:00
Casey Rodarmor
498549b35c
Allow reading torrent metainfo from stdin
Torrent metainfo can be read from standard input by passing `-`:

    cat a.torrent | imdl torrent verify --input -
    cat a.torrent | imdl torrent link --input -
    cat a.torrent | imdl torrent show --input -

type: added
2020-04-07 19:01:29 -07:00