← Back to issue list

Linefeeds are wrong when output is redirected to file

View original Github issue

Metadata

Project
craft-cli
Number
#75
Type
issue
State
open
Author
cmatsuoka
Labels
Created
2022-04-08 00:41:03+00:00
Updated
2022-04-08 02:06:14+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

When sending the output of a craft-cli application to a file we should translate CRs to LFs (and possibly remove the line padding), otherwise we end up with something like `Line 1 [padding] ^M Line 2 [padding] ^M Line3 [padding]`. This is the real output of snapcraft redirected to a file: ``` Launching instance... Initializing parts lifecycle ^MInstalling package repositories... Executing parts lifecycle... ^MInstalled package repositories ^MExecuting parts lifecycle: skip pull figlet (already ran) ^MExecuted: skip pull figlet (already ran) Executing parts lifecycle: skip overlay figlet (already ran) ^MExecuted: skip overlay figlet (already ran) Executing parts lifecycle: skip build figlet (already ran) ^MExecuted: skip build figlet (already ran) Executing parts lifecycle: skip stage figlet (already ran) ^MExecuted: skip stage figlet (already ran) Executing parts lifecycle: skip prime figlet (already ran) ^MExecuted: skip prime figlet (already ran) Executed parts lifecycle Generating snap metadata... ^MGenerated snap metadata Creating snap package... ```

Evaluation history

No evaluation history available.