Skip to content

Show file size in the success message#101

Merged
swissspidy merged 2 commits into
mainfrom
100-show-the-size-of-the-file-when-it-creates
Sep 24, 2024
Merged

Show file size in the success message#101
swissspidy merged 2 commits into
mainfrom
100-show-the-size-of-the-file-when-it-creates

Conversation

@ernilambar
Copy link
Copy Markdown
Member

@ernilambar ernilambar commented Sep 6, 2024

Fixes #100

@ernilambar
Copy link
Copy Markdown
Member Author

@swissspidy Regarding feature tests here, should we change should be to should contain here? I would prefer to keep should be with whole output with size also. WDYT?

@ernilambar
Copy link
Copy Markdown
Member Author

Related wp-cli/wp-cli#5978

Comment thread src/Dist_Archive_Command.php
@swissspidy
Copy link
Copy Markdown
Member

Regarding feature tests here, should we change should be to should contain here? I would prefer to keep should be with whole output with size also. WDYT?

should be is probably too strict because there can be slight differences in file sizes on different environments.

I'd go for option 3: regex

Example (untested):

Then STDOUT should match /^Success: Created bar8.tar.gz \(Size: \d+ B\)$/

@ernilambar ernilambar force-pushed the 100-show-the-size-of-the-file-when-it-creates branch from c5d31e3 to aa953ab Compare September 6, 2024 10:47
@ernilambar ernilambar force-pushed the 100-show-the-size-of-the-file-when-it-creates branch from aa953ab to 264ff61 Compare September 6, 2024 11:03
@ernilambar ernilambar marked this pull request as ready for review September 6, 2024 11:06
@ernilambar ernilambar requested a review from a team as a code owner September 6, 2024 11:06
@davidperezgar
Copy link
Copy Markdown

Thanks for the PR!

@swissspidy swissspidy added the command:dist-archive Related to 'dist-archive' command label Sep 24, 2024
@swissspidy swissspidy added this to the 3.0.2 milestone Sep 24, 2024
@swissspidy swissspidy merged commit 141573b into main Sep 24, 2024
@swissspidy swissspidy deleted the 100-show-the-size-of-the-file-when-it-creates branch September 24, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:dist-archive Related to 'dist-archive' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the size of the file when it creates

3 participants