Skip to content

FIX: redirect to encode base64 as hash bash64 is deprecated#8351

Merged
sholderbach merged 1 commit intonushell:mainfrom
amtoine:fix/encode-base64-command-redirects-to-deprecated-hash-base64
Mar 7, 2023
Merged

FIX: redirect to encode base64 as hash bash64 is deprecated#8351
sholderbach merged 1 commit intonushell:mainfrom
amtoine:fix/encode-base64-command-redirects-to-deprecated-hash-base64

Conversation

@amtoine
Copy link
Copy Markdown
Member

@amtoine amtoine commented Mar 7, 2023

Description

i tried yesterday to encode with an invalid character set and this is what i got

>_ {alg: "HS256", type: "JWT"} | to json -r | encode base64 --character-set invalid-character-set
Error:
  × value is not an accepted character set
   ╭─[entry #11:1:1]
 1 │ {alg: "HS256", type: "JWT"} | to json -r | encode base64 --character-set invalid-character-set
   ·                                                                          ──────────┬──────────
   ·                                                                                    ╰── invalid-character-set is not a valid character-set.
Please use `help hash base64` to see a list of valid character sets.
   ╰────

but hash base64 is now a deprecated command, see help hash base64.

=> this PR changes the error message to mention help encode base64, where the list of valid character sets is, instead

User-Facing Changes

$nothing

Tests + Formatting

  • 🟢 cargo fmt --all
  • 🟢 cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
  • 🟢 cargo test --workspace

After Submitting

$nothing

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 7, 2023

Codecov Report

Merging #8351 (4222be2) into main (0e21678) will increase coverage by 0.37%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8351      +/-   ##
==========================================
+ Coverage   68.13%   68.50%   +0.37%     
==========================================
  Files         620      620              
  Lines       99409    99409              
==========================================
+ Hits        67728    68101     +373     
+ Misses      31681    31308     -373     
Impacted Files Coverage Δ
...tes/nu-command/src/strings/encode_decode/base64.rs 89.93% <100.00%> (ø)
crates/nu-color-config/src/nu_style.rs 80.22% <0.00%> (+70.91%) ⬆️

@amtoine amtoine closed this Mar 7, 2023
@amtoine amtoine reopened this Mar 7, 2023
@sholderbach
Copy link
Copy Markdown
Member

Merci!

@sholderbach sholderbach changed the title FIX: redirect to encode base64 because hash bash64 is deprecated FIX: redirect to encode base64 as hash bash64 is deprecated Mar 7, 2023
@sholderbach sholderbach merged commit f34034a into nushell:main Mar 7, 2023
@amtoine
Copy link
Copy Markdown
Member Author

amtoine commented Mar 7, 2023

Merci!

😱 😉

@amtoine amtoine deleted the fix/encode-base64-command-redirects-to-deprecated-hash-base64 branch March 7, 2023 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants