# CLI: fix stdin dumping behavior · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ae119a9a8d5b8dec21bd314e91afcec122eb8631)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ae119a9a8d5b8dec21bd314e91afcec122eb8631

Requested commit: ae119a9a8d5b8dec21bd314e91afcec122eb8631

Commit: ae119a9a8d5b8dec21bd314e91afcec122eb8631

Tree: b47079e19cee86e8f244be48dd29b0666336743d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
CLI: fix stdin dumping behavior

 * no need to move `tmpFilePath` around
 * no need for calculating max length of `FileExt` tag name
 * provide a canonical file extension name for `FileExt` so that, e.g.
   the file will be named `stdin.S` instead of
   `stdin.assembly_with_cpp`.
 * move temp file cleanup to a function to reduce defer bloat in a large
   function.
 * fix bug caused by mixing relative and absolute paths in the cleanup
   logic.
 * remove commented out test and dead code

```

## Parents

- [2e692312f104e1e5533c9f389d73488ea4a1ef68](https://git.cafe/gitcafe/zig/commit/2e692312f104e1e5533c9f389d73488ea4a1ef68?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ae119a9a8d5b8dec21bd314e91afcec122eb8631?format=markdown)
