Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-printable characters observed when CLI command output is redirected to text file #2951

Closed
ImJohnMDaniel opened this issue Jul 9, 2024 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@ImJohnMDaniel
Copy link

Expected result

No extra, non-printable characters should be included in a text file if I redirect the command output to a file

Actual result

Various non-printable characters are seen in the document. These include:

  • esc[1m
  • esc[2m
  • esc[22m
  • esc[4m
  • esc[24m

These characters are not observed in the console itself if the command output is not redirected.

Steps to reproduce

  • Execute the following command: sf package create -h > package-create-info.txt
  • Open the text file in VSCode
  • Observe the non-printable characters

This issue has been seen on several of the commands when redirecting output to a text file.

System Information

CLI:
@salesforce/cli/2.50.5 win32-x64 node-v21.1.0

Plugin Version:
@dx-cli-toolbox/sf-toolbox-aep-utils 0.7.5 (user)
@dx-cli-toolbox/sfdx-toolbox-package-utils 0.8.4 (user)
@dx-cli-toolbox/sfdx-toolbox-utils 0.1.2 (user)
@oclif/plugin-autocomplete 3.1.6 (core)
@oclif/plugin-commands 4.0.6 (core)
@oclif/plugin-help 6.2.5 (core)
@oclif/plugin-not-found 3.2.10 (core)
@oclif/plugin-plugins 5.3.4 (core)
@oclif/plugin-search 1.2.2 (core)
@oclif/plugin-update 4.4.7 (core)
@oclif/plugin-version 2.2.6 (core)
@oclif/plugin-warn-if-update-available 3.1.8 (core)
@oclif/plugin-which 3.2.6 (core)
@salesforce/cli 2.50.5 (core)
apex 3.2.4 (core)
auth 3.6.33 (core)
community 3.2.11 (user)
data 3.5.5 (core)
deploy-retrieve 3.9.13 (core)
info 3.3.17 (core)
limits 3.3.17 (core)
marketplace 1.2.17 (core)
org 4.3.4 (core)
packaging 2.7.0 (core)
schema 3.3.19 (core)
settings 2.3.8 (core)
signups 2.3.3 (user)
sobject 1.4.19 (core)
source 3.5.3 (core)
telemetry 3.6.1 (core)
templates 56.3.2 (core)
trust 3.7.13 (core)
user 3.5.17 (core)
sfdmu 4.33.17 (user)
SF ENV. VARS.
SF_AUTOUPDATE_DISABLE,true
SF_DISABLE_AUTOUPDATE,true
SF_UPDATE_INSTRUCTIONS,Use "npm update --global @salesforce/cli" to update npm-based installations.
Windows: true
Shell: C:\Users\MyHomeDir\AppData\Local\Programs\Git\usr\bin\bash.exe
Channel: stable

Diagnostics

✅ pass - salesforcedx plugin isn’t installed
✅ pass - you don't have any linked plugins
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.yarnpkg.com
✅ pass - [@salesforce/plugin-trust] can ping: https://registry.npmjs.org/
✅ pass - using latest or latest-rc CLI version
✅ pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
✅ pass - can access: https://appexchange.salesforce.com/services/data
✅ pass - can access: https://test.salesforce.com
✅ pass - can access: https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-win32-x64-buildmanifest
❌ fail - [@salesforce/plugin-auth] CLI supports v2 crypto
✅ pass - [@salesforce/plugin-auth] CLI using stable v1 crypto

@ImJohnMDaniel
Copy link
Author

Here is an example of what I am seeing
package-create.txt

@mdonnalley mdonnalley added the bug Issue or pull request that identifies or fixes a bug label Jul 9, 2024
Copy link

git2gus bot commented Jul 9, 2024

This issue has been linked to a new work item: W-16198524

@cristiand391
Copy link
Member

this should be fixed on latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants